Newbie needs help with regular expression

Newbie needs help with regular expression

am 16.02.2007 11:19:51 von raj

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)