petersego
asked on
How do I strip string for specific characters
I have a string entered dynamically, that I want to strip for any characters, that is not english. Example: Jürgen should be Jrgen.
How would I do that.
How would I do that.
Why not Jurgen or Juergen
Anyway
str = str.replace(/[^a-zA-Z]/g," ")
str = str.replace(/[^a-zA-Z]/g,"
ASKER
Because I dont know what special characters might be used. There might be dozens of unknown characters like ê, ë, õ, æ and I cant make rules for everyone.
But if its possible I would love it.
But if its possible I would love it.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes, you are right about the replacement rules - too. Thanks a lot.