I'm glad you found #px. The issue here is that bounded repetitions like
{1,2} are not part of the #rx grammar.
But #px supports them just fine.

http://docs.racket-lang.org/reference/regexp.html

On Fri, Mar 11, 2016 at 5:38 PM, Héctor Mc <soulras...@gmail.com> wrote:

>
> Hey, I have this problem, I want filter values from DPTO1 to
> DPTO99 (DPTO is a word with letter O not zero) but I don't
> get that. with #rx mark error/false with DPTO2, DPTO3, etc but with
> DPTO111, DPTO100 is good. with #px all is true for both DPTO222
> or DPTO12. How filter this range correctly. Thanks.
>
>
> (define dpto "DPTO2") ; legal values are from DPTO1 to DPTO99
> (if (regexp-match? #rx"DPTO[1-9]{1,2}" dpto)
>     (display "true dpto")
>     (display "false dpto"))
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to racket-users+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to