Newbie needs help with regular expression

Hi,

Please can someone help regarding providing a regular expression for entering
a set of characters with letters, numbers, periods (.), hyphens (-), or
underscores (_) only.

I've got as far as this:

$pattern="^([_a-z0-9-]+)(\.[_a-z0-9-])$";

Thank you in advance.

Kind regards,

Raj (newbie)
raj [ Fr, 16 Februar 2007 11:19 ] [ ID #1631522 ]
PHP » alt.php.sql » Newbie needs help with regular expression

Vorheriges Thema: Newbie needs help with ereg regular expression
Nächstes Thema: php/mysql syntax help