tags:

views:

42

answers:

2
var_dump(preg_match_all('/(job_show\.asp\?id=[0-9]*)">/s',':</font><a href="job_show.asp?id=42"',$match));

$hrefs = $match[1];
var_dump($hrefs);

Output is:

int(0)
array(0) {
}

It's supposed to match "job_show.asp?id=42"

+4  A: 

Because your pattern has "> at the end and there is no "> at the end of the searched string.

cletus
You observation ability is awesome.
Shore
A: 

Add a Question Mark Quantifier after the > and see if that starts to capture the data you're looking for.

/(job_show\.asp\?id=[0-9]*)">?/
Brian Wigginton