Page 1 of 1

Syntax - Regular Expressions ???

Posted: Tue Jan 01, 2008 11:10 pm
by mardanny71
What for Syntax - Standart have PB for Regular Expressions?
How I can set correct working Quantifier?
Is this a Bug?

Code: Select all

; {n}         <- exakt n   = incorrect
; {,n}        <- max n     = incorrect
; {n,}        <- min n     = ok (by this Example)
; {n,n}       <- min,max   = incorrect

Dim result.s(200)
#reg0 = 0

If CreateRegularExpression(#reg0,"[0-9]{3,}") ; <- this works correct; please change the Quantivier
  For zaehler = 0 To 200
    result.s(zaehler) = Str(zaehler)
  Next
Else
  MessageRequester("Test","no Regular Expression")
EndIf

For a = 0 To 200
 Debug result.s(a)
 Debug MatchRegularExpression(#reg0,result.s(a))
Next
Plaese Sorry for my English.

by
mardanny71

Posted: Wed Jan 02, 2008 12:14 am
by hallodri
http://www.pcre.org/pcre.txt

Code: Select all

         {n}         exactly n
         {n,m}       at least n, no more than m, greedy
         {n,m}+      at least n, no more than m, possessive
         {n,m}?      at least n, no more than m, lazy
         {n,}        n or more, greedy
         {n,}+       n or more, possessive
         {n,}?       n or more, lazy

Posted: Wed Jan 02, 2008 1:31 am
by mardanny71
Thank you for the Doku. :)
bye
mardanny71