?
Solved

Need help with a regular expression

Posted on 2014-11-29
5
Medium Priority
?
99 Views
Last Modified: 2015-01-02
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,"
0
Comment
Question by:AlexPonnath
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 84

Accepted Solution

by:
ozo earned 2000 total points
ID: 40472197
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},/
0
 
LVL 46

Expert Comment

by:aikimark
ID: 40472588
Blind link comment deleted

aikimark -- zone advisor
0
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 40473822
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.
0

Featured Post

A new era in Cloud training has arrived.

A day that will go down in Cloud history.. But are you ready for it? Will you accept this Cloud challenge?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi, Even though I have created this Tutorial on My personal Blog, Some people might not able to find my website, So here i am posting it again Today, from the topic it is very clear that i will be showing you here the very basic usage of how we …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Suggested Courses

741 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question