What follows is rescinded by me; I won't delete the text, but it's here in a small red font to let you know it's (already) out-dated.
That being said, I'm also going to release (if I can figure out how to do it safely) re::capture, which will introduce a new assertion: (?N=pat). It will allow you to specify what capture group you're assigning to. Here's an example of its use:
This is not going to be a filter, but rather will work like re, and redefine the functions Perl uses to do its compiling and matching. It won't change much, but it will add support for this new assertion.
That's pesky because then you have to post-process the quotes out of them. re::capture (isn't that a witty name?) will allow you to say:
This case might be resolved in other ways, but it's a good demonstration of what the module does. The other thing I think I'll make it implement are captures that exist only in the regex, and are ignored (that is, not returned) afterwards. That means you can write:
and the regex will only return ($1, $2) each time it matches.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regex Report
by demerphq (Chancellor) on Jun 27, 2004 at 20:30 UTC | |
|
Re: Regex Report
by japhy (Canon) on Jun 28, 2004 at 03:59 UTC | |
|
Re: Regex Report
by Enlil (Parson) on Jun 28, 2004 at 02:23 UTC | |
by japhy (Canon) on Jun 28, 2004 at 03:40 UTC | |
|
Re: Regex Report
by diotalevi (Canon) on Jun 28, 2004 at 13:32 UTC | |
by japhy (Canon) on Jun 28, 2004 at 13:39 UTC | |
by diotalevi (Canon) on Jun 28, 2004 at 15:27 UTC | |
by japhy (Canon) on Jun 28, 2004 at 15:52 UTC |