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

python - Writing Greek in matplotlib labels, titles -

c# - LINQ to Entities does not recognize the method 'Int32 IndexOf(System.String, System.StringComparison)' method -

Pygame memory leak with transform.flip -