Hoppa till huvudinnehållet

Regular Expression Maximum Length

Kommentarer

2 kommentarer

  • Permanently deleted user
    Hi Lisa,

     

    I'm not a regular expresison expert, so there may be a better way to do this, but your expression is only allowing lowercase a to z, and uppercase A to Z, not spaces or a period.  I just ran this through a regular expresison validator and your test sentance passed, so this may work for you:

     

    /^[a-zA-Z .]{1,250}$/

     

    This new expresison will allow spaces, and periods.  Note the space and period after the capital Z in your character set.  

     

    I hope this helps!

     

    Thanks,

     

    Danny
    0
  • Permanently deleted user
    Thank you Danny! Once again you've saved the day!
    0

Du måste logga in om du vill lämna en kommentar.