Prior to a recent dev channel release (I’m afraid I’m not sure which), the following context worked as expected in ST:
regex_AFTER_PATTERN:
- meta_include_prototype: false
- match: >-
(?x) ((
([gimyu])
(?:
(?!\1) ([gimyu])
(?:
(?!\1|\2) ([gimyu])
(?:
(?!\1|\2|\3) ([gimyu])
(?:
(?!\1|\2|\3|\4) ([gimyu])
)?
)?
)?
)?
))
{{idEnd}}
captures:
1: string.regexp.js keyword.other.js # ^BS
2: string.regexp.flags.es
pop: true
- match: '\w+'
scope: invalid.illegal.token
pop: true
- include: else_pop
That was great; it followed the grammar perfectly. It would match “gim” or “mig”, and it would capture the “gi” in “gig”, but the second “g” was correctly scoped as an invalid token.
Something’s changed – this pattern no longer seems to work as of a recent ST3 dev channel release. It now matches only single character flag sequences; anything else is invalid. Are we no longer using Oniguruma?