troubleshooting Question

Regular Expression

Avatar of cf_mi6
cf_mi6 asked on
ProgrammingRubyRegular Expressions
11 Comments1 Solution433 ViewsLast Modified:

I have a question regarding regular expressions.  I've tried looking it up, but haven't had any luck finding a solution so far.  I have been given a comma separated value file that has some extra line breaks added into it.  It's a 250MB text file so I don't want to go hunting through by hand to find all the extra line spaces and remove them myself.

Each new line should start out with one of three values:


I need to find all the lines that do not start with those words so that I can remove the extra line breaks.  The only thing I've been able to find so far would be something along the lines of \n[^NCS] which would only check the first character, when I need it to check the entire word.

I'm offering 500 points for this because I'm in kind of a rush.

Thanks a lot,

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 11 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros