|
Posted by Ted Zlatanov on June 26, 2006, 2:52 pm
Please log in for more thread options
On 26 Jun 2006, jeremyje@gmail.com wrote:
> Is there a library or a way to generate an appropriate regular
> expression for any given input string?
> (remove quotes for examples)
> For example: "1234567890abcdef is in hex9"
> Regex Generator returns: [0-9|A-F] [a-z] [a-z] [0-9|a-z]
>
> Or anything that does some sort of similar processing?
I only know of this one:
http://search.cpan.org/~dankogai/Regexp-Optimizer-0.15/lib/Regexp/Optimizer.pm
Emacs also has a regexp-opt function you may find interesting (as an
alternate approach in a different language).
Ted
|