I want to define a 'valid' input, which is _-.
won't be allowed in the end or in the begining of the string, only allowed in the middle.
Acceptable characters (location doesn't matter): a-zA-Z0-9
and all the hebrew letters which I don't know how to allow them in a regex (maybe just hard-coding all the letters?)
Unacceptable characters (location doesn't matter): All symbols, except the special ones I provided before.
I don't know how to build this pattern, and if you can add tips and comments on every section so I will understand. Thanks!
This is not for homework, just for self learning.