k-takata/Onigmo — pull request #17 by knu (2013-05-27 12:44:40+00:00)
Title: Can't ENCLOSE_OPTION be allowed in look-behind?

Currently Onigmo (or Oniguruma) does not allow option enclosures (like `(?i)`) in look-behind, but isn't it possible to allow them?

Taking Ruby as example, this restriction prevents a pattern from being interpolated within a look-behind construct of another.

```
pattern1 = /foo/ # stringified as "(?-mix:foo)"
pattern2 = /(?<=#{pattern1})/
#=> RegexpError: invalid pattern in look-behind: /(?<=(?-mix:foo))/
```

This pull request is an unconfirmed attempt to fix the problem.
Thanks for your consideration.