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ález
  Vänligen
  före
  innehĺlla

I'm trying to build a RegExp that will see if the string is a proper name
format or not.

Names only have A thru Z, extended characters for other languages (than
English), SPACE, PERIOD, DASH/HYPHEN, APOSTROPHE
  Dr. Roger O'Malley
  Mrs. Sara Harris-Henderson

I have a RegExp to do English letters, but not the extended set...
  Manuel González
  Försök Bokstäver
  Contém Espaço-Válido

(Ok, these are not really names, but you get the idea)

Any ideas on this?

All I want to know is if a given string contains only these types of
characters. anything else would give me a FALSE.

Thanks
Walter

hi walter,
because most of these chars are extended ascii (decimal: 128-255), this regex should work: '/\x80-\xFF/' (hex-values). also take care of the minus in your regex if it doesn't stand on start or end of your char-group it means 'from-to'!
hth SVEN


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to