Strip non-alphanumeric except spanish characters.

Posted on 2010-03-31
Medium Priority
Last Modified: 2012-06-21
I'm currently strip all non-alphanumeric characters from a string in PHP like this:

I'd like to change it so it doesn't strip spanish characters.

FYI, my server's locale is english-us.

The spanish characters I don't want to strip include:

In hexadecimal they'd be:
Question by:CtrlAltDl
  • 2
LVL 13

Accepted Solution

Superdave earned 2000 total points
ID: 29291834
LVL 14

Author Comment

ID: 29809382
I got to do a little more testing on it, but I think this is meeting my needs.
LVL 14

Author Closing Comment

ID: 31806653
Unfortunately I still haven't tested it thoroughly, but I didn't want to leave this question open any longer.  Thanks for your response!

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
I recently worked on a Wordpress site that utilized the popular ContactForm7 (https://contactform7.com/) plug-in that only sends an email and does not save data. The client wanted the data saved to a custom CRM database. This is my solution.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

600 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question