regex - Regular Expression to match 6-15 alphanumeric characters plus symbols above 1-8 keys on keyboard -


I am trying to get a regular expression that allows between 6 - 15 characters and the one- ZA-Z0- 9 and the symbol above 1 - 8 numbers on a keyboard.

What I have here but this does not work

  '/ ^ [a-zA-Z0-9 -_] [\! \ @ \ # \ $ \% ^ ^ & Amp; \ *] {5,16} + $ / 'Within brackets you have two separate sets.'  

Basically the expression "1-zA-Z0-9-_" And make 5-16 special characters in the same set of brackets and you are all good.

Something similar is:

  '/ ^ [a-zA-Z0-9-_ \! \ @ \ # \ $ \% ^ ^ & Amp; \ *] {5,16} + $ / ' 

Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -