Tutorial  Tools & Languages  Examples  Reference 

Match Duplicate Comma-Delimited Items

(?<=,|^)([^,]*)(,\1)+(?=,|$)

Options: ^ and $ match at line breaks

Regular expression analyzed with RegexBuddy.
HTML output from RegexBuddy adapted with a PowerGREP search-and-replace sequence.

Welcome
Tutorial
Tools and Languages
Examples
Reference
About This Site
Download and Print