Re: numbers and strings and regex?
- From: anno4000@xxxxxxxxxxxxxxxxxxxxxxx (Anno Siegel)
- Date: 30 May 2005 16:43:25 GMT
Geoff Cox <geoff.cox@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in comp.lang.perl.misc:
> Hello
>
> I have a series of files such as
>
> blue-green-01-01.doc to
> blue-green-01-09
> blue-green-01-11 up to
> blue-green-01-32
>
> and am trying to evaluate the second set of 2 digits using File::Find
> and this bit of code
>
> if ($name =~ /.*?(\d{2})-((\d{1})(\d{1}))\.jmx/i) {
Your pattern requests files that have an extension ".jmx". Your examples
have an extension ".doc" or none. Also, \d{1} is the same as \d.
[snip]
Anno
.
- Follow-Ups:
- Re: numbers and strings and regex?
- From: Geoff Cox
- Re: numbers and strings and regex?
- References:
- numbers and strings and regex?
- From: Geoff Cox
- numbers and strings and regex?
- Prev by Date: numbers and strings and regex?
- Next by Date: Perl Cookbook
- Previous by thread: numbers and strings and regex?
- Next by thread: Re: numbers and strings and regex?
- Index(es):
Relevant Pages
|