You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any more complete documentation of the whitespace handling? I'm trying to parse a list of regexps that are surrounded by containing tokens (think "1.0 2.0 3.0"), with mandatory spaces separating them. Repeat doesn't work, because it accepts a sequence w/o any space, and if I add a space to the regex it fails to match the last item if there's no space after it. List with delimiter=" " doesn't work either. If I look for repetition of a Keyword instead of a Regex it behaves as expected, presumably because keywords have to be separated by something. More explicit information on where whitespace is or isn't required would be helpful to figure out how to do this, I think. E.g. what exactly needs to separate keywords? whitespace? word breaks\b? Is it true that List delimiters can't be whitespace?
As a secondary question, what's the best way to match what I need (a list of regexps with spaces as delimiters, but no space required after the final one)? Must I do Sequence(Repeat(Regex(re + '\s'), mi=0), re) ?
The text was updated successfully, but these errors were encountered:
by way of followup, should Sequence(Repeat(r_float, mi=0), r_float) be the same as Repeat(r_float), where r_float = Regex('...') ? I would have thought yes, but the second matches strings that the first does not. Is that a bug that I should open a separate issue for, or is it expected (and if so, can you explain why)?
I was able to get my code working with a better regexp, but I still think some more explicit explanation of how it decides when each element ends would be helpful, as would a list with whitespace delimiters.
Is there any more complete documentation of the whitespace handling? I'm trying to parse a list of regexps that are surrounded by containing tokens (think
"1.0 2.0 3.0"
), with mandatory spaces separating them.Repeat
doesn't work, because it accepts a sequence w/o any space, and if I add a space to the regex it fails to match the last item if there's no space after it.List
withdelimiter=" "
doesn't work either. If I look for repetition of aKeyword
instead of aRegex
it behaves as expected, presumably because keywords have to be separated by something. More explicit information on where whitespace is or isn't required would be helpful to figure out how to do this, I think. E.g. what exactly needs to separate keywords? whitespace? word breaks\b
? Is it true thatList
delimiters can't be whitespace?As a secondary question, what's the best way to match what I need (a list of regexps with spaces as delimiters, but no space required after the final one)? Must I do
Sequence(Repeat(Regex(re + '\s'), mi=0), re)
?The text was updated successfully, but these errors were encountered: