misterperl has asked for the wisdom of the Perl Monks concerning the following question:
CAT1 does NOT match. Which is actually good news because that's exactly what I wanted, but I'm a but surprised because I thought , at least in English, it sounded like a match? In English is this acts like:CAT[2-9]*$
But my English interpretation would be:"CAT followed by nothing, or else if there ARE chars after CAT, all must be 2-9 only."
so CAT1 meets that standard since it is CAT followed by 0 chars that match 2-9?"CAT followed by 0 or more digits 2-9."
Can you express this regex in English that makes sense? My *correct* interpretation seems overly complex?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: State this simple regex in English?
by Athanasius (Archbishop) on Apr 20, 2016 at 14:43 UTC | |
|
Re: State this simple regex in English?
by toolic (Bishop) on Apr 20, 2016 at 14:44 UTC | |
by misterperl (Friar) on Apr 20, 2016 at 17:22 UTC | |
by soonix (Chancellor) on Apr 20, 2016 at 18:52 UTC | |
by AnomalousMonk (Archbishop) on Apr 20, 2016 at 20:50 UTC | |
by Anonymous Monk on Apr 20, 2016 at 22:13 UTC | |
by Discipulus (Canon) on Apr 21, 2016 at 06:54 UTC | |
by stevieb (Canon) on Apr 20, 2016 at 17:45 UTC | |
|
Re: State this simple regex in English?
by stevieb (Canon) on Apr 20, 2016 at 14:47 UTC |