When you use the pipe character as your delimiter for the m// operator,
you're screwing up the use of the pipe character as the "or" operator in
your regex.

You'll either have to escape the pipe character (E.g.  m|(A\|B)|) or use
a different delimiter.


-----Original Message-----
From: Tom Allison [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 09, 2006 5:44 PM
To: Tom Allison
Cc: beginners perl
Subject: Re: regex...

Tom Allison wrote:


<snip>

Breaking it down I get this:

$string =~ /(?:(A|B))/   WORKS!!!!
$string =~ m|(?:(A|B))|  DOES NOT WORK
$string =~ m%(?:http://)%;  ALSO WORKS....

What's the magic screw-up that I'm pulling when I try to make a match
with
m| | instead of m% % or / / ?????

<snip>



--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to