vinforget has asked for the wisdom of the Perl Monks concerning the following question:
How would I go about reporting the position in a string of nested matches to a pattern like this
Example:[XYZ]{3}[A-Za-z]{0,21}[ABC]{3}
would result with 3,3FGTXYZGTFABCGHABC
or
would result with 3,8FGTXYZADXYZGTYABC
I have been interating through the string one char at a time using a while loop, but this take quite a bit of time. Is there a faster way?
Thank you for your time.
edited: Mon Aug 18 20:06:42 2003 by jeffa - formatting
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: nested pattern matching
by CombatSquirrel (Hermit) on Aug 18, 2003 at 19:14 UTC | |
by vinforget (Beadle) on Aug 18, 2003 at 19:36 UTC | |
by CombatSquirrel (Hermit) on Aug 18, 2003 at 19:43 UTC | |
by vinforget (Beadle) on Aug 18, 2003 at 20:01 UTC | |
by CombatSquirrel (Hermit) on Aug 18, 2003 at 20:11 UTC | |
by CombatSquirrel (Hermit) on Aug 18, 2003 at 20:06 UTC | |
by vinforget (Beadle) on Aug 18, 2003 at 20:14 UTC | |
| |
by davido (Cardinal) on Aug 19, 2003 at 06:49 UTC | |
by vinforget (Beadle) on Aug 18, 2003 at 19:39 UTC | |
|
Re: nested pattern matching
by chromatic (Archbishop) on Aug 18, 2003 at 19:01 UTC |