Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $input = trim(fgets(STDIN));
- $replace = preg_replace('/\<a [^>]*?href\s*=\s*\'([^<>\s]*)\'[^\<]*>((\s|.)+?)\<\/a\>/i', "[URL=$1]$2[/URL]", $input);
- $replace = preg_replace('/\<a [^>]*?href\s*=\s*"([^<>\s]*)"[^\<]*>((\s|.)+?)\<\/a\>/i', "[URL=$1]$2[/URL]", $replace);
- echo $replace;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement