There is a task to write a regular expression to skip 2 words, for example, the name and surname, in any language (English, German ...).
That's how i thought
var str = "ΠΠΌΡ ΡΠ°ΠΌΠΈΠ»ΠΈΡ ΡΠ΅ΠΊΡΡ ΡΠ΅ΠΊΡΡ"; str.match(/^[^!@#]+ [^!@#]+$/i); And here is the result
["ΠΠΌΡ ΡΠ°ΠΌΠΈΠ»ΠΈΡ ΡΠ΅ΠΊΡΡ ΡΠ΅ΠΊΡΡ"] Why is the regular expression validated? Maybe I do not check correctly, I do not understand ...
In theory, the regulars should find a match.
start_string [any_symbol_krome! @ #] minimum 1 time space [any_symbol_krome! @ #] end_string
But, in the example after the 2nd word there are still spaces, characters, and they also miss
I need to check for any characters except those 3 characters.
Here is the tester https://regex101.com/r/kJ5vZ2/4
^[^!@#]+$will also pass :) you do not include a space in the forbidden characters, add it to the brackets it will work - splash58