[regex-coach] regex not matching blank space after the beginning of the line?

Ian.H regex-c at digiserv.net
Wed Dec 6 02:47:59 UTC 2006


Dharma Wolford wrote:
> Hi everybody,
>
> In the following examples the double-quotes are only included for
> clarity, I'm not actually entering them into The Regex Coach.
>
> Here are two regexes I'm trying:
> #####################
> "\A*7[0-9][0-9]"
   ^^
Is that a typo?



> And these are lines of data I'm trying those against:
> ########################
> " 758"
> "  759"
> "  760"
> ########################




    \s*[0-9]{3}


works fine here for any (or no) leading space followed by 3 digits.



Regards,

  Ian

--
$_="26432841792441078041435211430434648439292039649241435237148836077240
7208";s/\s//gs;@a=$_=~m!......!g;$_=<DATA>;@b=$_=~m!......!g
;map{push(@a,$_ ); }@b;map{print chr($_/3572); }@a; __DATA__
114304285760360772407208385776114304371488346484353628382204360772407208

-- 
$_="26432841792441078041435211430434648439292039649241435237148836077240
7208";s/\s//gs;@a=$_=~m!......!g;$_=<DATA>;@b=$_=~m!......!g
;map{push(@a,$_ ); }@b;map{print chr($_/3572); }@a; __DATA__
114304285760360772407208385776114304371488346484353628382204360772407208



More information about the regex-coach mailing list