Re: [PHP] Add to regex help

2004-10-19 Thread Silvio Porcellana
Uhm, I guess you are looking for links (following a 'href') in your HTML page, so why don't you just do something like: preg_match_all('/href=[\"\']?([^\"\'>\s]*)[\"\']?/i', $url, $matches) (note the '\s' added inside the bracket that should match the link, as you could have: - that is, a link "

[PHP] Add to regex help

2004-10-18 Thread Mag
Hi, Quite some time back I modified a regex (to the one below) to work with my script: if (preg_match_all('/]*)[\"\']?[^>]*>.*?<\/a>/i', $url, $matches)) { foreach($matches as $match){$links[] = $match;} } Problem is, I dont really know REGEXs properly and dont remember how I modified it and i