I am writing some regex on a php form to validate input and have come up
with this, for example -
if (empty($first) || !eregi(^[A-Za-z]+[- ]?[A-Za-z]+$, $first))
for checking a persons name. This allows a single name, or a hyphenated
double name, or a non-hyphenated double name, and it works.
Chip Wiegand wrote:
I am writing some regex on a php form to validate input and have come up
with this, for example -
if (empty($first) || !eregi(^[A-Za-z]+[- ]?[A-Za-z]+$, $first))
for checking a persons name. This allows a single name, or a hyphenated
double name, or a non-hyphenated double
At 11:04 3/7/2005, Chip Wiegand wrote:
I am writing some regex on a php form to validate input and have come up
with this, for example -
if (empty($first) || !eregi(^[A-Za-z]+[- ]?[A-Za-z]+$, $first))
for checking a persons name. This allows a single name, or a hyphenated
double name, or a