Regular Expressions 101

Community Patterns

There does not seem to be anything here

Community Library Entry

1

Regular Expression
PCRE (PHP <7.3)

/
(?<![a-z])([\,\.\?]+)?(\s[\,\.\?]+)?
/
g

Description

remove dublicate punctuation marks and keep punctuation if stay near a word( abc, , ,) last , ,

Submitted by Suciu Razvan - 9 years ago