Matching REx "(?:(.)b|.)+" against "abc" 0 <> | 1:CURLYX[0] {1,32767}(15) 0 <> | 14: WHILEM[1/1](0) whilem: matched 0 out of 1..32767 0 <> | 3: BRANCH(11) 0 <> | 4: OPEN1(6) 0 <> | 6: REG_ANY(7) 1 | 7: CLOSE1(9) #### 1 | 9: EXACTF (14) 2 | 14: WHILEM[1/1](0) whilem: matched 1 out of 1..32767 2 | 3: BRANCH(11) 2 | 4: OPEN1(6) 2 | 6: REG_ANY(7) 3 <> | 7: CLOSE1(9) #### 3 <> | 9: EXACTF (14) failed... 2 | 11: BRANCH(13) #### 2 | 12: REG_ANY(14) 3 <> | 14: WHILEM[1/1](0) whilem: matched 2 out of 1..32767 3 <> | 3: BRANCH(11) 3 <> | 4: OPEN1(6) 3 <> | 6: REG_ANY(7) failed... 3 <> | 11: BRANCH(13) 3 <> | 12: REG_ANY(14) failed... BRANCH failed... whilem: failed, trying continuation... 3 <> | 15: NOTHING(16) 3 <> | 16: END(0) Match successful! Test: $1='c', $2='' #### Matching REx "(?:(.)b|.)+" against "ac" 0 <> | 1:CURLYX[0] {1,32767}(15) 0 <> | 14: WHILEM[1/1](0) whilem: matched 0 out of 1..32767 0 <> | 3: BRANCH(11) 0 <> | 4: OPEN1(6) 0 <> | 6: REG_ANY(7) 1 | 7: CLOSE1(9) #### 1 | 9: EXACTF (14) failed... 0 <> | 11: BRANCH(13) #### 0 <> | 12: REG_ANY(14) 1 | 14: WHILEM[1/1](0) whilem: matched 1 out of 1..32767 1 | 3: BRANCH(11) 1 | 4: OPEN1(6) 1 | 6: REG_ANY(7) 2 <> | 7: CLOSE1(9) 2 <> | 9: EXACTF (14) failed... 1 | 11: BRANCH(13) 1 | 12: REG_ANY(14) 2 <> | 14: WHILEM[1/1](0) whilem: matched 2 out of 1..32767 2 <> | 3: BRANCH(11) 2 <> | 4: OPEN1(6) 2 <> | 6: REG_ANY(7) failed... 2 <> | 11: BRANCH(13) 2 <> | 12: REG_ANY(14) failed... BRANCH failed... whilem: failed, trying continuation. .. 2 <> | 15: NOTHING(16) 2 <> | 16: END(0) Match successful! Test: $1='', $2=''