Quoth Mahurshi Akilla <
[email protected]>:
Those regexes you list will match a lot more than just the strings you
have provided. How are you choosing which bits are important?
If you have a set of regexes and you want to combine them,
Regexp::Assemble may be what you want.
Ben- Hide quoted text -
- Show quoted text -
Thanks. This is similar to what I am looking for but not quite the
same. I do find this module interesting though.
http://search.cpan.org/dist/Regexp-Assemble/Assemble.pm#LIMITATIONS
Regexp::Assemble does not attempt to find common substrings. For
instance, it will not collapse /cabababc/ down to /c(?:ab){3}c/. If
there's a module out there that performs this sort of string analysis
I'd like to know about it. But keep in mind that the algorithms that
do this are very expensive: quadratic or worse.
Basically what I am looking for something that can do this string
"collapsing" for a list of strings. I am fine if it just puts a "*"
for the most common stuff. It doesn't have to be all that accurate.
It is okay if it can match other stuff as well.
If there is nothing out there, I will probably have to write my own
algorithm. I was just hoping I don't have to reinvent the wheel.