php tutorial gets url's address code regularly
//method one
$ str = '<a href="http://www.jzread.com" target="_blank" name="doc3_p"> <img src = "" onload = "setImgSize (this, 170,170);"> </ a> ';
preg_match_all ('| ^ <a href = "(. *)". * | U', $ str, $ out, PREG_PATTERN_ORDER);
print_r ($ out);
//Method Two
preg_match_all ('/ href = [' "] + (. *) ['"] + /', $ str, $ matches);
var_dump ($ matches [1]);
// method three
// (? <= <as *) href = [^ '">] +
// method four
preg_match ("/ <as * href =" (. *?) "[^>] *>. *? </a> / is", $ str, $ aMatch);
print_r ($ aMatch [1]);
// method five
preg_match_all ('/ href = (' | "| s) * ([^ '"> s] +) / i', $ str, $ match);
print_r ($ match);
preg_match_all ('/ src = (' | "| s) * ([^ '"> s] +) / i', $ str, $ match);
print_r ($ match);
/ *
This is the above url is the regular use of php regular expression to try to achieve, but the method is a bit different.