regXwild icon indicating copy to clipboard operation
regXwild copied to clipboard

Capture data for all quantifiers

Open 3F opened this issue 9 years ago • 0 comments

The most lightweight way (+Speed) implement flag to enable capturing data by default for all quantifiers *?+#

  • @c ... enabled ...
  • @c ... enabled ... @c ... disabled ...

example:

  • @c12*5 a?d 34+7
    • 12005 and 3417
      • -> $1 - 00
      • -> $2 - n
      • -> $3 - 1

Alternative

Speed - is most important, because the regex engine much more powerful anyway.

v2:

  • @c ... @
    • 12@c*@7 - > 12457 accessor: $n

v3 (overhead):

  • @c flag - switch to enable () for capturing
    • @c12(*)7 - > 12457 accessor: $1 - 45
    • escape \(\) or (())

3F avatar Feb 11 '17 14:02 3F