in reply to Matching Text Regular Expression.

'|' is a regex metacharacter (see perlre). You need to put a backslash ('\') in front of it if you want to match a pipe ('|').