daily pastebin goal
13%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. preg_replace('/[-]+/', '-', preg_replace('/[^a-zA-Z0-9_-]/s', '-', strtolower($string)));
  2.    
  3. [^a-zA-Z0-9_-]
  4.    
  5. [^a-zA-Z0-9_-]+
  6.               ^- + = one or more
  7.    
  8. [^a-zA-Z0-9_]+
  9.    
  10. preg_replace('/[^a-zA-Z0-9_]+/s', '-', strtolower($string));
  11.    
  12. preg_replace('/[^a-z0-9_]+/s', '-', strtolower($string));
  13.    
  14. $urlSlug = preg_replace('/[^a-z0-9_]+/', '-', strtolower($string));
  15.    
  16. preg_replace('/[^a-zA-Z0-9_-]+/s', '-', strtolower($string));
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top