Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Matching RE's

From: d4marcus:dtek:chalmers:se at: 24-Mar-2001 18:53

On Fri, 23 Mar 2001 [jelinem1--nationwide--com] wrote:
> >> find/case/any/match "user qwerty r" "*ggly" > == " r" > That totally boggles my mind. After staring at it for awhile I can almost > see what it's doing, but it's certainly not the behavior I initially
Yes, I think I can too. But it's almost the opposite to what it really should do: Compare these ones:
>> find/case/any/match "user" "*e"
== "r"
>> find/case/any/match "user" "*se"
== none
>> find/case/any/match "user" "*ae"
== "r" If there's more than one character to match, it returns none only if it matches, otherwise the next one. Opposite! Trying again:
>> find/case/any/match "user" "*user"
== none
>> find/case/any/match "user" "*usar"
== none
>> find/case/any/match "user" "*uaar"
== none
>> find/case/any/match "user" "*aaar"
== "" No character except the last one must match, otherwise it returns none. Seems they have inverted the logic somehow. I probably should report this as a bug. Marcus ------------------------------------ If you find that life spits on you calm down and pretend it's raining