Syntax - Regular Expressions ???

Just starting out? Need help? Post your questions and find answers here.
User avatar
mardanny71
User
User
Posts: 14
Joined: Sat Sep 02, 2006 8:59 pm
Location: Germany

Syntax - Regular Expressions ???

Post 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
User avatar
hallodri
Enthusiast
Enthusiast
Posts: 208
Joined: Tue Nov 08, 2005 7:59 am
Location: Germany
Contact:

Post 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
User avatar
mardanny71
User
User
Posts: 14
Joined: Sat Sep 02, 2006 8:59 pm
Location: Germany

Post by mardanny71 »

Thank you for the Doku. :)
bye
mardanny71
Post Reply