Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Recognizing numbers and creating links

by bitingduck (Chaplain)
on Apr 14, 2015 at 04:21 UTC ( [id://1123354]=note: print w/replies, xml ) Need Help??


in reply to Recognizing numbers and creating links

There are certainly more clever ways to do it, but for small data sets (as in takes less than a few minutes to process) I'd just do multiple passes, where on the first one I'd find all the phone numbers and wrap them in some kind of tag (typically an xml-ish tag, but really anything you won't see in the regular data set, like a double underscore) so that I know to ignore them on the next pass. Then on the next pass I'd make the regex and/or logic such that it ignores things tagged as phone numbers. If I get motivated later this evening I'll post some code.

  • Comment on Re: Recognizing numbers and creating links

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1123354]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-24 22:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found