简体   繁体   中英

Regex for allowing alphanumeric, special characters and space

I am searching for a regular expression for allowing alphanumeric characters, special characters (-_'àâçèéêîôùûÀÈÙÇÉ), or spaces in the middle in JavaScript. I tried Googling but wasn't able to find that.

Can anyone help me out with this?

Thanks in advance.

You can try something like this:

([\d\w\-'àâçèéêîôùûÀÈÙÇÉ])([\d\w\-' àâçèéêîôùûÀÈÙÇÉ][\d\w\-'àâçèéêîôùûÀÈÙÇÉ]+)*

Check this expression on https://regexr.com/

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM