I would like to allow all Alphanumeric Characters and disallow all Special Characters in a RegEx. But I would like to allow German Umlauts but becouse they are Special Chars too, I can't type them in. I use this Script:
if(website_media_description.match(/[^a-zA-Z0-9]/g)) {
alert('Found Special Char');
}
So when a äöüÄÖÜß is in the variable than I get the alert too. I also tryed this Script:
if(website_media_description.match(/[^a-zA-Z0-9äöüÄÖÜß]/g)) {
alert('Found Special Char');
}
But this also does not work. Can someone please tell me what I am doing wrong?
Thanks :)