in reply to japhy's regex article for the TPJ
In my opinion...what's really needed for regex is a stable interface into presenting regex to humans. most people i know would like to have the power to access regex easily, but without the arcane symbols. there are some programs about that do this, translating from various spoken languages from/to regex. alas, their gui etc. interface is hardcoded. if we had a module instead....
Please, please, pretty please provide a way to do regex with sexy things like image/sound/video files. thanks heaps.
Re: Re: japhy's regex article for the TPJ
by japhy (Canon) on May 20, 2004 at 14:08 UTC
|
use Regexp::English;
my $re = Regexp::English
-> start_of_line
-> literal('Flippers')
-> literal(':')
-> optional
-> whitespace_char
-> end
-> remember
-> multiple
-> digit;
while (<INPUT>) {
if (my $match = $re->match($_)) {
print "$match\n";
}
}
_____________________________________________________
Jeff [japhy]Pinyan:
Perl,
regex,
and perl
hacker, who'd like a job (NYC-area)
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;
| [reply] [d/l] |
|