# phpuser@xxxxxxxxxx / 2007-01-15 19:22:24 -0500: > > From: 'Roman Neuhauser' [mailto:neuhauser@xxxxxxxxxx] > > # phpuser@xxxxxxxxxx / 2007-01-15 18:33:31 -0500: > > > > From: Roman Neuhauser [mailto:neuhauser@xxxxxxxxxx] # > > > > phpuser@xxxxxxxxxx / 2007-01-15 16:31:32 -0500: > > > > > I have file which I use for validating which includes the > > > > > following > > > > > function: > > > > > > > > > > function invalidchar($strvalue) > > > > > { > > > > > if(!ereg("^[[:alpha:][:space:]\'-.]*$", $strvalue)) { > > > > > > > > That regexp matches if $strvalue consists of zero or more > > > > ocurrences of a letter, a whitespace character, and any > > > > character whose numeric value lies between the numeric values of > > > > "'" and "." in your locale. Zero or more means it also matches > > > > an empty string. > > > All I want to accomplish here is to allow the user to enter > > a to z, A > > > to Z, and /\'-_. and a space. Is there a better way to do this? > > > > 1. Do you really want to let them enter backslashes, or are you trying > > to "escape" the apostrophe? > > 2. Does that mean that "/\'-_." (without the quotes) and " " (that's > > three spaces) are valid entries? > > Where do you see 3 spaces? That's a value the regexp will match. Is that intended? > In any event, I don't think this is the problem. > As I have said the code works fine on two other pages, which logically > suggests that there is something on this page that is causing a problem. You don't understand that single function, and it does something else than you think it does. I told you what it actually does, but you chose to ignore the information. I don't know how I could help you more. -- How many Vietnam vets does it take to screw in a light bulb? You don't know, man. You don't KNOW. Cause you weren't THERE. http://bash.org/?255991 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php