We help IT Professionals succeed at work.

Need help with a regular expression

i need to parse some text and replace some stuff and i think regular expressions is the best way to go.

i need to find the following strings

A)  ",, , ," which is a comma + comma = space + comma + space = Comma
B)  ",,|"
c)  "2014-06-17 13:00:42,, , ," the date could always change


also is there a quick way to find with regular expression the following scenario wher there is always a 4 CHAR string
followed by 2 commas and i would like to change it to string and 1 comma like from "MB01,," to "MB01,"
Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2015
Commented:
A) /,, , ,/ or /,\+,= \+,\+ =,/ if I interpret the '+' and '=' in your description literally
B) /,,\|/
C) /\d{4}-\d\d-\d\d \d\d:\d\d:\d\d,, , ,/
also) /.{4},/
CERTIFIED EXPERT
Top Expert 2014

Commented:
Blind link comment deleted

aikimark -- zone advisor
CERTIFIED EXPERT
Most Valuable Expert 2011
Top Expert 2015

Commented:
ColdFusion doesn't use pattern delimiters, so you can drop the forward slashes ( / ) from ozo's suggestions. If Javascript is in use, then you will need to keep them.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.