Jswalter schrieb:
...
- allow apostrophes, but only if preceded *and* followed by a Alpha/Extend
- allow hyphen/dash, but only if preceded *and* followed by a Alpha/Extend
...
hi walter,
how about something like this:
$_alpha = 'a-zA-Z'; // standard latin letters
$_xascii = '\x80-\xF
I should have posted some "rules" with this...
assuming:
- a SPACE is used to delimit first from last name [Walter Torres]
- a HYPHEN is used to separate a dual name (British style) [Conrad-Smyth]
- an APOSTROPHE is used in many Irish and Scotish names [O'Reilly]
- a PERIOD is used in titles,
Jswalter schrieb:
I've hit my limit on regular expressions.
I need to check a string to see if it contains legal characters...
A thru Z [a-z], SPACE, PERIOD, DASH/HYPHEN, APOSTROPHE [\' -,\.]
OK, this is not a problem.
My problem comes in with extended characters, as these examples...
Gonzále
Well have you thought about maybe an array of illegal or extended
characters and simply replacing them?
eg.
$b = $_POST['whatever_variables_you_have'];
$match = array("ö","ç","ä");
$replace = array("o","c","a");
$z = str_replace($match,$replace,$b);
Might not be exactly what you want but hope it
4 matches
Mail list logo