Closed Bot12313 closed 6 months ago
It appears that everything is now being returned as a list, so it needs to be converted back into a string to work with it.
The posPredicate one should read:
posPredicate = @match:$[0-9]+ &{return parseInt(match, 10) < 100}
note the $
. This returns "23" but fails on "233". The @
is so that the predicate doesn't return a confusing null.
The second one needs a better default input of "aaa bbbb" or something.
Valid issue, willfix.
Problem
Some examples in the documentation seems either outdated, incorrect, or impossible to reproduce in online version on Peggy.
& { predicate }
The example appears to be working fine but is impossible to reproduce the results in the online version.
Even after adding the "match" label, it still produces error.
@ ( label : )? expression
Unable to use the "matches" examples noted below.