Revision: 56232
Updated Code
at March 17, 2012 04:20 by rwunsch
Updated Code
/* * DO NOT USE THE PATTERN STRING DIRECTLY IN 'preg_match()' !!!! * */ $pattern = '/(?<=href\=")[^]]+?(?=")/'; $replacedHrefHtml = preg_replace($pattern, $replacement, $html);
Revision: 56231
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at March 17, 2012 03:20 by rwunsch
Initial Code
$replacedHrefHtml = preg_replace('/(?<=href\=")[^]]+?(?=")/',$replacement, $html);
Initial URL
Initial Description
Replaces all links within href part of anchor in a HTML-String.
Initial Title
Remove / Replace - href / anchor /link - in html /string - preg_replace - php - regex - regular expression
Initial Tags
regex, html, links
Initial Language
PHP