Skip to content Skip to sidebar Skip to footer

Regular Expressions And Chinese

I have a database query based on user input, However if the user inputs any one common letter in the search the app will crash. but as the search also supports Chinese characters I

Solution 1:

You should definitely fix any crashes first. To distinguish between English and Chinese (CJK) characters, you can use character classes such as \p{ASCII}, \p{Alpha} for ASCII and \p{InCJKUnifiedIdeographs} for CJK characters.


Post a Comment for "Regular Expressions And Chinese"