Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Profiterole 232 posts 264 karma points
    Jun 01, 2010 @ 03:13
    Profiterole
    0

    Regex in contour

    Hi, I created a form with a textfield where I want people to write their age. But, I just want numbers. For instance : 27, not 27 years old. So I'd like to use regex to disallow alphabetic caracters and only allow numeric caracters.

    But, what I need to write in the regex field? What I want or what I do not want?

    Thank you

  • Anders Burla 2560 posts 8256 karma points
    Jun 01, 2010 @ 08:30
    Anders Burla
    0

    You need to specify what you want

    \d+ accept only 1 or more digits and nothing else

  • Profiterole 232 posts 264 karma points
    Jun 01, 2010 @ 14:26
    Profiterole
    0

    Thank you, it works like a charm!

Please Sign in or register to post replies

Write your reply to:

Draft