Re: Using regular expressions with delimitaters

2007-04-12 Thread yaron
Hi The "8.1.8" =~ /[\d $versao \s]/ will always return true because the square parenthesis ([]) matches the string against one of the chars inside. In this case the \d (digit) matches because you have a digit inside. In your code you wrote "8.1.8" =~ /$version/. This takes the $version a treat

Re: Using regular expressions with delimitaters

2007-04-11 Thread Chas Owens
On 4/11/07, Rodrigo Tavares <[EMAIL PROTECTED]> wrote: snip if ( "8.1.8" =~ /$version/) snip You are using the operators incorrectly. It should look like this: if ($version =~ /8\.1\.8/) The form is "variable binding_operator regex". Note that the periods need to be escaped otherwise they w

RE: Using regular expressions with delimitaters

2007-04-11 Thread Moon, John
From: Rodrigo Tavares [mailto:[EMAIL PROTECTED] Sent: Wednesday, April 11, 2007 9:31 AM To: beginners@perl.org Subject: Using regular expressions with delimitaters Hello, I need to use the delimiter " " , (one blank space). I read perdoc, i try to use this : if ( "8.1.8" =~ /[\d $versao \s]/)