Skip to content

Instantly share code, notes, and snippets.

@rlandas
Created January 6, 2016 03:44
Show Gist options
  • Save rlandas/83c085832216ee9848c1 to your computer and use it in GitHub Desktop.
Save rlandas/83c085832216ee9848c1 to your computer and use it in GitHub Desktop.
REGEX : contains english and non-english 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