Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /^_+$/
- if (strspn($str, '_') == strlen($str)) {
- // only underscores
- }
- if( !preg_match("/[^0-9a-z_]/si", $string) && trim($string,"_")!=""){
- // Code here
- }
- if( trim($string,"_")=="") ){ /* _ only */ }
- if( str_replace("_", "", $string)=="") ){/* _ only */}
- if( !preg_match("/^_/si", $string) ){/* _ only */}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement