Here is a regular season:

"/[^\.\,\-\_\'\"\@\?\!\:\$ a-zA-Z0-9()]/" 

Tell me, please, how else to add Russian characters, but only English remain.

Update

@ ua6xh I wanted to use this regular check of the title of the article before writing to the database.

 "/[^\.\,\-\_\'\"\@\?\!\:\$ a-zA-Z0-9А-Яа-я()]/" 

I redid it, right?

 "/[^\.\,\-\_\'\"\@\?\!\:\$\sa-zA-Z0-9А-Яа-я()]/" 

So replace the space?

Update 2

@ ua6xh did like this

 "/[^.\,-_\'\"\@\?!\:\$ a-zA-Z0-9А-Яа-я()]/" 

But this is what happened when you entered the word "programmer"

 п ог амми   
  • four
    And what do you want to make this regular? maybe it was easier to take \W ? And on the question - just add AA-Ya PS: it is recommended to write the space as \s - it can at least be seen in the regular schedule. - Opalosolo
  • 6
    @ Kolyambiy, is unicode included in the regular list (is the u modifier worth it?)? - etki
  • 2
    @Fike you can see that no. I also wanted to notice. - lampa
  • 3
    /регулярка/u - etki

1 answer 1

Thank. Did so:

 "/[^\.\,\-\_\'\"\@\?\!\:\$ a-zA-Z0-9А-Яа-я()]/u" 

Works.