Serge
Serge
These code examples did not work properly with Cyrillic, so I proposed a solution. If it is approved, it will be also necessary to further describe it in the comments...
Also, if we want to show a match (rather than a non-match) in this example, we can for example change the word 'ink' to 'чорнил', so we will get a...
Without improving this regular expression, 'null' is returned when working with Cyrillic text, because Cyrillic characters are not always properly accounted for when using ' \w ', which is Latin-oriented.
Deleted the extra word("на") in the sentence: "Шаблон [.,] шукатиме на один з двох символів, або крапку, або кому."