File tree Expand file tree Collapse file tree
eo-runtime/src/main/eo/tt Expand file tree Collapse file tree Original file line number Diff line number Diff line change 7676 # - `groups` - tuple of identified matched groups
7777 #
7878 # The block provides the next API to work with matched string subsequence:
79- # - `groups- count` - to get amount of matched groups
79+ # - `count` - to get amount of matched groups
8080 # - `exists` - to check if matched block is not empty
8181 # - `next` - to get next matched block
8282 # - `text` - to get matched subsequence as `string`
8888 # here, in `matched`. Don't forget to remove this puzzle.
8989 [position start from to groups] > matched
9090 $ > matched
91- groups.length > groups- count
91+ groups.length > count
9292 start.gte 0 > exists
9393 if. > next
9494 exists
154154
155155 # Tests that accessing groups count on non-matched block throws error.
156156 [] +> throws-on-getting-groups-count-on-not-matched-block
157- ((regex "/[a-z]+/").match "123").next.groups- count > @
157+ ((regex "/[a-z]+/").match "123").next.count > @
158158
159159 # Tests that accessing groups on non-matched block throws error.
160160 [] +> throws-on-getting-groups-on-not-matched-block
245245 and. > @
246246 and.
247247 and.
248- first.groups- count.eq 3
248+ first.count.eq 3
249249 (first.group 1).eq "hello"
250250 (first.group 2).eq "1"
251251 and.
252252 and.
253- second.groups- count.eq 3
253+ second.count.eq 3
254254 (second.group 1).eq "world"
255255 (second.group 2).eq "2"
256256 ((regex "/([a-z]+)([1-9]{1})/").compiled.match "!hello1!world2").next > first
You can’t perform that action at this time.
0 commit comments