[rt-users] Regular expressions (Perl regex) for validation
Gaston Huot
Gaston at huot.me
Wed Oct 1 09:20:57 EDT 2014
For those who have the same question (or similar), Marc provided the
correct answer in my context: ^(|\d{2})$
Thank you Marc
GH
2014-09-30 10:13 GMT-04:00 Marc Chantreux <mc at unistra.fr>:
> On Tue, Sep 30, 2014 at 09:18:37AM -0400, Gaston Huot wrote:
> > In this custom field, the user has to enter:
> > -either nothing
> > -either a number of exactly 2 digits
>
> if you use the x modifier:
>
>
> (
> # Nothing
> |
> \d{2} # two digits
> )
>
> the old school one is
>
> (|\d{2})
>
> HTH
>
> --
> Marc Chantreux,
> Mes coordonnées: http://annuaire.unistra.fr/chercher?n=chantreux
> Direction Informatique, Université de Strasbourg (http://unistra.fr)
> Service Métiers, Pôle Outils Collaboratifs
> "Don't believe everything you read on the Internet"
> -- Abraham Lincoln
>
--
Gaston
514.823-7202
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20141001/a080f545/attachment.htm>
More information about the rt-users
mailing list