in reply to Regular Expresson How to Match

It works as expected here. I get the "Line is..." output. What are you seeing?

Of course, it's not working for exactly the reasons that you think it is. '|' is a special character in regexes and needs to be escaped (with a backslash) if you don't want it to mean "or".

--
<http://dave.org.uk>

"The first rule of Perl club is you do not talk about Perl club."
-- Chip Salzenberg