regex - Regular expression should match white space only if some test is entered -JS -


I currently have this regex / ^ [A-Za-z_] {3,20} $ /; The problem with this expression to validate the name in my website is that it matches three or more places! I did not enter any name and just confirmed it three times to enter the hit space! I just want to validate white spaces if I enter some text how to do this?

  / ^ [azza-jade] [azza-g_] {2 , $ 19 / $ /   

If you use it, space / undescores will be accepted only after one letter has already been entered.

Comments

Popular posts from this blog

c++ - Cmake produces file extensions in static library archives -

c# - Roxy file manager in MVC doesn't accept session path -

c# - XML - Serialize class - Some questions -