Link to home
Start Free TrialLog in
Avatar of richardsimnett
richardsimnett

asked on

I need a regular expression...

Hello,
I need a regular expression (I'm not familiar with them), to be used with String.replaceall. It needs to match and replace the following characters comma, double quote, carriage return, and linefeed. If you could also explain how it works so that I can start learning how to do this that would be great.

Worth 500 points.

Thanks,
Rick
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
[,\"\r\n]
[] defines characters classes, in this case to match any character character listed
carriage return is specified by \r
new line is specified using \n
" needs to be escaped in a java string \" so it isn't treated as closing the string
:-)