$counter = 0; $textfile = "rfl.txt"; open (TEXT, "$textfile") || die "Con't Open $textfile"; @text=<TEXT>; close(TEXT); $glob = @text; for($i=0; $i<$glob; $i++){ $_ = @text[$i]; if(/eid=/){ $counter = 1 - $counter; print $_ if $counter; } }
Example Text: 'junk' website: http://www.jxxxxx.com/ > Additional links on www.jxxxxx.com: > http://www.jxxxxx.com/ > http://www.jxxxddd.com/> http://www.jtrsss.com/redir.asp?id=7446&email=murad@webtv.net > http://www.jaxost.com/unsubscribe.asp?eid=3701&customer=murrad@webtv +.net > http://www.jaceee.com/redir.asp?id=7445&email=murad@webtv.net Fri, 20 Jul 2001 'more junk' Example Output: f=http://www.jxxxx.com/bp_unsubscribe.asp?eid=3711&customer=x> <A href=http://www.jadssss.com/unsubscribe.asp?eid=3716&customer=x>her +e</a> If you would rather not receive these messages, please unsubscribe at: +<br>< Wished it was: http://www.jxdsl.com/bp_unsubscribe.asp? http://www.jxxxx.com/bp_unsubscribe.asp? http://www.jxrexx.com/bp_unsubscribe.asp?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Cleaning Regexp
by hillard (Acolyte) on Jul 31, 2001 at 00:03 UTC | |
by hillard (Acolyte) on Jul 31, 2001 at 00:08 UTC | |
by hillard (Acolyte) on Jul 31, 2001 at 00:34 UTC | |
|
Re: Cleaning Regexp
by Agermain (Scribe) on Jul 31, 2001 at 01:20 UTC | |
by bbfu (Curate) on Aug 01, 2001 at 21:57 UTC | |
|
(bbfu) (URI::Find) Re: Cleaning Regexp
by bbfu (Curate) on Aug 01, 2001 at 22:15 UTC |