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

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -