Created
January 6, 2016 03:44
-
-
Save rlandas/83c085832216ee9848c1 to your computer and use it in GitHub Desktop.
REGEX : contains english and non-english characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(preg_match('/[^[:alpha:][:punct:][:digit:]]/u', utf8_encode($input)) { | |
// contains english and non-english characters | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment