Regex to match comma + newline -


i'm looking regular expression check occurrences of , , newline character together. prefer egrep.

example:

strstr("hello world","hello"); 

should not match, and

strstr("hello world",        "hello"); 

should return match.

i tried both egrep ',\n', , egrep ',$', unsuccessful.

have tried

,\r\n 

depending on platform different

\r    mac os 9  \n   unix/linux, starting mac os 10 (os x) \r\n dos 

the regex

,$ 

should work, , more universal, remember set option $ matches @ line breaks , not end of entire string.


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -