I am using a JavaScript RegEx which is mentioned below:
^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*([-_.])).+$
This accepts only that text which has at least 1: uppercase letter, lowercase letter, number & a special symbol from .-_.
Now assume I supply User-123
as the user id which confirms to the above RegEx & I use the onscreen keyboard to type in a character from Finnish language, which results in User-123Ã
.
The RegEx being fulfilled, the text is accepted by my JavaScript code, but I want it to only accept Alphanumeric input in English, and nothing else.
How should I enhance this RegEx to do so?