Beefy Boxes and Bandwidth Generously Provided by pair Networks
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.

_____________________________________________________
Jeff[japhy]Pinyan: Perl, regex, and perl hacker.
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;


In reply to Re: generating regexes? by japhy
in thread generating regexes? by mortis

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2024-04-18 11:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found