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

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -