Avatar of AlexPonnath
AlexPonnathFlag for United States of America

asked on 

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,"
Regular ExpressionsJavaScriptColdFusion Language

Avatar of undefined
Last Comment
kaufmed
ASKER CERTIFIED SOLUTION
Avatar of ozo
ozo
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of aikimark
aikimark
Flag of United States of America image

Blind link comment deleted

aikimark -- zone advisor
Avatar of kaufmed
kaufmed
Flag of United States of America image

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.
JavaScript
JavaScript

JavaScript is a dynamic, object-based language commonly used for client-side scripting in web browsers. Recently, server side JavaScript frameworks have also emerged. JavaScript runs on nearly every operating system and in almost every mainstream web browser.

127K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo