Hello!
I am trying to parse expression consisting of two elements, where an element can be either an alphanumerical block enclosed in {}, or a number. I am having difficulties using the () to assign names to the matches: when accessing the name corresponding to a block, only the initial '{' is collected. The following snippet illustrates the issue:
Hello!
I am trying to parse expression consisting of two elements, where an element can be either an alphanumerical block enclosed in {}, or a number. I am having difficulties using the () to assign names to the matches: when accessing the name corresponding to a block, only the initial '{' is collected. The following snippet illustrates the issue:
I would expect r.one to be '{xx}', instead of '{'. What am I missing here?
Thanks,
Boris
Answering my own question, I was able to get the expected result by grouping:
best,
Boris