From: "Paul Kraus" <[EMAIL PROTECTED]>
> ok I knew that :) for some reason I was thinking \s meant any white
> space that follows but it just means any 1 white space character
> without quantifiers.
> 
> Ok so then why does this work
>  if (/Report Total:\s+[\d,.]+/){
>      print "\$&=$&\n";
>  }
> 
> and this not work.
>  if (/Report Total:\s+
>      [\d,.]+/x){
>      print "\$&=$&\n";
>  }

Because the whitespace is ignored in a regexp with /x.
So the second regexp is equivalent to 

        /ReportTotal:\s+[\d,.]+/

you have to "escape" the space there:

  if (/Report\ Total:\s+
      [\d,.]+/x){
      print "\$&=$&\n";
  }

HTH, Jenda
===== [EMAIL PROTECTED] === http://Jenda.Krynicky.cz =====
When it comes to wine, women and song, wizards are allowed 
to get drunk and croon as much as they like.
        -- Terry Pratchett in Sourcery


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to