It seems to me that | has a special meaning in regular expression world. I am using ruby and could not find much documentation on same.
http://rubular.com/regexes/11724 works.
http://rubular.com/regexes/11725 does not work. Why and what is the correct regex.