My blog has moved!
You should be automatically redirected in 5 seconds. If not, visit http://samueladesoga.wordpress.com and update your bookmarks.

Monday 11 January 2010

Regex for pipe "|" character

I was trying to split a string using a regex today and i had this problem

my string of format

A | B | C

My intent was to split this string using the Regex match for "|"

The regex that worked for me was "\\|" - escaping pipe and then escaping the slash the escapes the pipe

No comments: