develooper Front page | perl.beginners | Postings from March 2023

Re: A Regular Expression Problem in Perl 5.28

Thread Previous | Thread Next
From:
Uri Guttman
Date:
March 28, 2023 21:36
Subject:
Re: A Regular Expression Problem in Perl 5.28
Message ID:
66a44c42-a8ed-efa3-eae5-7d336dc71499@perlhunter.com
On 3/28/23 17:14, Sam wrote:
> On 3/28/23 16:07, Uri Guttman wrote:
>>
>> my $re = qr/^\d{5,}/ ;
>>
>> that should be all you need.
>>
>> read perlretut to learn more regex basics. you have escaping and 
>> quoting mistakes in the original.
>>
>> uri
>>
>
> I would think /^\d{5,6}/ would be what is needed? He wanted 5 or 6 
> digits.
>

yes, but he kept the {5,} repeat count. so i just kept it too.

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


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About