develooper Front page | perl.wxperl.users | Postings from February 2013

RE: Vaiidators

Thread Previous
February 13, 2013 00:22
RE: Vaiidators
Message ID:
Hi James,

> I want to enter a time of day value such as ##:## and ensure the colon
> was entered.

I'd live to hear if you manage to do this.

>2. I have tried a number of regex strings:
>      (\d+)              allows entry of numbers
>      (:)                  allows entry of colons
>      (\d+:)             allows no entry at all
>     (\d+:\d+)         allows no entry at all
>     (\d{2,}:\d{2,})    allows no entry at all
>    Do validators not allow for mixed alphanumeric fields? Seems like a
>common need.

I only managed to get a one character code, like \d+.

But the whole concept of these transfer buffers seemed a bit
counter-intuitive and old-school to me and so I didn't try very hard.

Let me know if you crack it.  As I'm writing this, I realise I never used
any regex feedback like \1 or whatever.

Good luck,



Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About