Advertisement
Guest User

Untitled

a guest
Nov 1st, 2014
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. $msg = '
  2. Here are all URLs:
  3. ------------------
  4. google.com
  5. www.google.com
  6. http://google.com
  7. http://www.google.com
  8. ftp://ftp.google.com
  9. ';
  10.  
  11. $msg = preg_replace("/^.*b(http://)?(www.)[^.]+.comb.*$/m",'',$msg);
  12.  
  13. Here are all URLs:
  14. ------------------
  15. google.com
  16.  
  17. http://google.com
  18.  
  19. ftp://ftp.google.com
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement