All pastes #255581 Raw Edit

Untitled

public text v1 · immutable
#255581 ·published 2006-11-23 03:34 UTC
rendered paste body
preg_match_all('/http:\/\/www\.url\.org\/dir\/Script\.php\?MODE=VIEW\&ID=(.*?)/i',$output,$myURLS, PREG_PATTERN_ORDER);
foreach($myURLS[0] as $linked) { echo $linked.'<br />';}

// this outputs the url... ie: http://www.url.org/dir/Script.php?MODE=VIEW&ID=
// as many times as the pattern is matched.. however i'm interested in the part after the &ID=
// i tried changing the array ref to $myURLS[1] - but this returned nothing... 
// is my regex right?