Specify the basic uppercase Latin letters and numbers as character ranges rather than using a POSIX character class:
I understand what you are saying but I deal with users from various countries which use different characters.
For example Sweden has the Å, and this is allowed.
All I want to do is disallow Ä Ü Ö
interesting, can you explain the reason why Å is allowed but Ä is not?
Your best option is to enumerate the allowed characters (i.e. [ABCDE...]). I would abstain from ranges (A-Z), because they depend on character order, which is different between alphabets. Here is an example:
I honestly do not know why the german characters are not allowed but the swedish ones are.
Just been told to validate that way.
I don't really want to have to list all the characters for the different alphabets
Someone on the pl/sql forum reccommended
REGEXP_LIKE ( str
, '^[[:alnum:] -]+$'
AND str = TRANSLATE ( str
I will try this approach first
1 person found this helpful
In addition to Christian:
Perhaps it is quicker to exclude the characters that you don't allow, instead of including all the ones that you DO allow. Use the caret to exclude certain characters:
Again I want to exclude all special characters except the - symbol and the german characters
There must be an easier way
I ended up using 2 validations
1 regular exp ^[[:alnum:]-]*$
Item in exp 1 does not contain characters in exp 2
Thanks for the help