Created
September 20, 2018 11:22
-
-
Save egulhan/15099bc344e3b584603a4942bc50f5a9 to your computer and use it in GitHub Desktop.
Check if text contains any arabic characters using php
This file contains 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
<?php | |
public static function checkTextContainAnyArabicCharacters($text) | |
{ | |
return preg_match('/[^\x{0600}-\x{06FF}]/u', $text); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment