On 3/28/23 16:17, Martin McCormick wrote:

        The string I am interested in testing for starts with 5
or 6 digits in a row and all I need to do is determine that the
first 5 or 6 characters are numbers Period.  That's all.


my $regextest = '/^\d+\{5,\}/' ;

why are you escaping the {}?? those are meta chars that are needed to make that a 5+ range. just delete the backslashes on them and it will work.

you need to know when to backslash and when not too. all regex chars which do something are not backslashed. alpha chars with backslashes are regex char types and special chars.

thanx,

uri


--
https://uriguttman.blogspot.com/
A Long Strange Trip
A blog about computers, food, my life and silliness.


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to