Re: A Regular Expression Problem in Perl 5.28
Jim Gibson via beginners <[email protected]> Tue, 28 Mar 2023 15:15:51 -0700
| Newsgroups | gmane.comp.lang.perl.beginners |
|---|---|
| Message-ID | <[email protected]> |
On Mar 28, 2023, at 3:00 PM, Martin McCormick <[email protected]> wrote: > > Uri Guttman <[email protected]> writes: >> yes, but he kept the {5,} repeat count. so i just kept it too. > > Now that I know how this works, I will probably change to > {4,} as this would match 4 or more digits. From reading the > documentation, {4} means 4 and only 4. {4,6} means 4 but nothing > else except 6. {N,} means N as a low limit but any number higher. \d{4,6} means match either 4, 5, or 6 successive number digits. Here is the spec from perldoc perlretut: * "a{n,m}" means: match at least "n" times, but not more than "m" times. Jim Gibson [email protected] -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/