>>>>> "Y" == Yukihiro Matsumoto <matz / zetabits.com> writes:

Y>  Or it's OK for you guys to fix for me. ;-)

 Well actually ruby do this

pigeon% ruby -rjj -e '/(?im:a|b)?x/.dump'
Regexp `(?im:a|b)?x'
  0     casefold_on
  1     option_set `ims'
  2     on_failure_jump         ==>  12
  3     start_paren
  4     on_failure_jump         ==>   7
  5     exactn "a" (1)
  6     jump                    ==>  11
  7     exactn "b" (1)
  8     casefold_off
  9     option_set `'
 10     push_dummy_failure
 11     stop_paren
 12     exactn "x" (1)
 13     end
subexpressions : 0
pigeon% 

 my proposition is to rewrite it, like this

pigeon% ruby -rjj -e '/(?im:a|b)?x/.dump'
Regexp `(?im:a|b)?x'
  0     on_failure_jump         ==>  10
  1     start_paren
  2     casefold_on
  3     option_set `ims'
  4     on_failure_jump         ==>   7
  5     exactn "a" (1)
  6     jump                    ==>   9
  7     exactn "b" (1)
  8     push_dummy_failure
  9     stop_paren
 10     casefold_off
 11     option_set `'
 12     exactn "x" (1)
 13     end
subexpressions : 0
pigeon% 

 and same for {n,m}

 Someone see a problem with this ?

Guy Decoux