javascript - Filter non-Alpha characters for multiple languages -


i want write regex remove non alpha characters, follows:

björn -> björn barry's -> barrys who? -> cibé? -> cibé i'd -> id ice-cream -> icecream no!!! -> no [{brackets}] -> brackets ~inv3rse -> invrse 

and convert characters lowercase versions. how do languages or @ least european languages using latin script?

str.tolowercase().replace(/[^a-z]/gi,''); 

this convert lowercase, replace isn't alphabetic character (a-z) empty string, removing them. in order keep other characters (like e accent mark) add symbol regex.


Comments

Popular posts from this blog

plot - Remove Objects from Legend When You Have Also Used Fit, Matlab -

java - Why does my date parsing return a weird date? -

Need help in packaging app using TideSDK on Windows -