go ahead... be a heretic | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
You guys missed the point, I think. First, Regexp::Common is just a module that provides common regexes instantly. Second, MRE does not contain a regex for matching email addresses from examples -- it builds the regex in pieces, so that it's easier to follow.
What Kyle wants is something I've wanted and realized is nigh impossible to create without HEAVY input from the user. Finding patterns is easy for humans, when we know what pattern we want. Telling computers to figure out a pattern is not so easy. The goal here is, given a set of input, determine the best pattern for matching the content. Phone numbers of the form 555-5555 are easy to generate a pattern for, if you know ahead of time that you're dealing with phone numbers!. And as soon as you get a 1-800 number, you're screwed. The concept is good, and Kyle makes a good attempt, but the problem is very hard. I've not attempted a solution yet, and you can be sure that I would have had I had a good idea of how to approach this problem.
_____________________________________________________ In reply to Re: generating regexes?
by japhy
|
|