Skip to content
Advertisement

PHP Regular Expression for Bengali Word/Sentence

I am developing a web application using PHP 5.3.x. Everything is working fine, but unable to solve an issue due to regular expression problem with Bengali Punctuation. Following is my code:

JavaScript

Whether I pass Bengali word or not, it always returns false. In JavaEE application I used this Regular Expression

JavaScript

But in PHP it not working! Anyways how do I solve this problem?

Advertisement

Answer

Maybe this will help you:

The PHP preg functions, which are based on PCRE, support Unicode when the /u option is appended to the regular expression.

From regex in Unicode

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement