regex is not working as expected
i am using this regex exp /[^\p{L}\s-]/
to capture strange characters.
The pro开发者_JAVA百科blem is that regex match this words for example:
Santarém (city name)
or
Constançia (city name)
so i need to block symbols like "#$#%/*&/!
but no the ´` Ç or ^~ -
thanks
I do not know how the city names are stored, but the marks could be stored as separate unicode elements, in which case you need to include the \p{M} set in your regex (as per http://www.regular-expressions.info/unicode.html#prop)
this solve my problem
thanks
[^A-Za-z0-9-áàçéâãôó]|(\d+)
精彩评论