Regex limited to English and Spanish characters

On my form I use the CKEditor for two fields and it works great. But now that I have added a regex expression to check input fields everything entered in the CKEditor boxes is squahed together in one big mess of unreadable text.

I had found a regex expression on a website that supports all international characters but it is an everything-including-the-kitchen-sink approach — preg_match("/^[\w\d\s.,-]*$/ — I hope somebody can show me what I need that will not screw up CKEditor inputs yet allow a person to use the tilde-n, acute-e, acute-a, acute-o, acute-i, and acute-u characters of Spanish, as well as the upside-down question mark and exclamation mark.

The person who will be using this site for their blog will be doing most of her writing in Spanish (her native language) and a bit in English. Therefore I would like to make this as user-friendly as possible for her language and her Spanish keyboard.

Sponsor our Newsletter | Privacy Policy | Terms of Service