in reply to Cleaning Regexp
Explanation:for($i=0; $i<$glob; $i++){ $_ = @text[$i]; if(/href="?([^">]*)\?eid=/is){ $counter = 1 - $counter; print $1 if $counter; } }
Update: I added the "is" options to the regex to allow uppercase URLs also. No biggie.
Update 2: Forgot that CODE tags don't need entity substitution, so I had > in one part instead of just >. I fixed it; sorry if I confused anyone.
agermain
"I don't want the world. I just want your half."
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(bbfu) Re2: Cleaning Regexp
by bbfu (Curate) on Aug 01, 2001 at 21:57 UTC |