Answer the question
In order to leave comments, you need to log in
How to build a regular expression correctly?
Hello.
Over a year ago, I wrote an almost similar post. link
Now I need to change the task a bit.
You need to allow only Russian, English, Ukrainian and numbers.
=======
Slightly incorrectly stated the task.
You need to skip eng, rus, ukr and numbers and the symbol (-), and delete the rest!
Answer the question
In order to leave comments, you need to log in
Try like this:
<?php
$filtText = preg_replace('#[^a-zа-яїіё0-9]#iu','',$text);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question