我使用replace(/[^\\w\\s]|_/g, "").replace(/\\s+/g, " ")
可以过滤所有特殊字符,但我不想过滤法语字母。
You can use this:
/[^\w\sàâäôéèëêïîçùûüÿæœÀÂÄÔÉÈËÊÏΟÇÙÛÜÆŒ]/g
You don't need special treatment for the _
as it is included in \\w
Reference
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.