Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $content = <<<EOS
- Link_1: [code]This is a textual line.
- www.google.com
- This is a textual line.[/code]
- Link_2: [php]This is a textual line.
- www.google.com
- This is a textual line.[/php]
- EOS;
- $needle = '~(?:https?://)?(?:www.)(?:[^.s]+)(?:.[^.ns]+)*.w{2,4}(?=(?:(?![/?(?:code|php)])[Ss])*[/(?:code|php)])~m';
- echo preg_replace($needle,'LINK HIDDEN',$content);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement