regex - Regular Expression for Alphanumeric, Phone, Email, special eg: "[A-C,@#!]" -


i have regular expression checks if string contains upper , lowercase letters, numbers,phone, email, special eg: "[a-c,@#!]"

can have these in single regexp?

try regexlib.com

  • e-mail: \b[a-z0-9._%-]+@[a-z0-9.-]+\.[a-z]{2,4}\b

  • phone#: ^[0-9]\d{2}-\d{3}-\d{4}$

and no, it's unlikely can concoct "one size fits regex" every 1 of different scenarios mentioned.


Comments

Popular posts from this blog

matlab - How to equate a structure array to structure array -

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -