RegEx experts needed

LawsHosting

Verified User
Joined
Sep 13, 2008
Messages
2,404
Location
London UK
I'm in need of some RegEx help. I'm looking to validate fields, but only allow
Code:
[a-z][0-9],* and @
I'm no good to RegEx, however G searches gave me this:
Code:
/[\'\/~`\!#\$%\^&£(\)_\-\+=\{\}\[\]\|;:\"\<\>,\.\?\\\]/
Is this ok, or is there a simpler way?
 
What are you validating? What is the input for email or something?

What programming language?

Give examples of input.
 
For DNS Records, PHP

eg. the host part for A record can only be [a-z], [0-9], * or @.... So, if someone puts a ( as a host, then, it'll error to the API.

I can't use javascript as this is a plug-in for commercial software I'm helping with - so it needs to be validated after submission.

PS. This isn't DA related btw
 
Back
Top