[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] how can I parse out fax numbers from ad texts?



At 20.42 8/13/97, Joseph\"ALVIS\"Alexander Snow wrote:
>if any guru can tell me a few lines of code to work with,
>i'd be grateful...
>I want to parse out fax numbers from ad texts,
>so I can fax away my resume...
>
>it gets tedious after a while and I'd like to automate it...
>
>maybe eventualy use applescript/frontier/perl to just go on time 1x a week
>to www sites,
>search for key words, download text, parse out fax nos, and fax away...
>
>for now I am just looking for that crutch your gonna give what will parse
>out fax no's a la perl...
>
>eg. ad reads: send letter to oweo;fjh f;jldf, or fax:233-645-56434,
>could be send fax to (232)834-9957, etc...
>you get the picture...
>
>U never *really* know where yer goin till u git thar.

This really is not a MacPerl question, and you would be better off in the
comp.lang.perl.misc newsgroup.  But actually, you would be better off
reading the book Mastering Regular Expressions.

But here is something to play with.

#!perl
$text = <<EOT;
eg. ad reads: send letter to oweo;fjh f;jldf, or fax:233-645-5643,
could be send fax to (232)834-9957, etc...
EOT

foreach ($text =~ /fax\D*([\d\/\(\)-]+)/ig) {print "$_\n"}

--
Chris Nandor             pudge@pobox.com             http://pudge.net/
%PGPKey=('B76E72AD',[1024,'0824 090B CE73 CA10  1FF7 7F13 8180 B6B6'])



***** Want to unsubscribe from this list?
***** Send mail with body "unsubscribe" to mac-perl-request@iis.ee.ethz.ch