Roadmap

June 25, 2026 · View on GitHub

  • Basic Match Handling: Provides functionality to match regular expressions against test strings.
  • Match Positions: Supports the extraction and display of match start and end positions.
  • Capture Groups: Extracts and displays capture groups from regex matches.
  • Named Captures: Supports capturing named groups from regex matches.
  • Regex Quick Reference: Provides a concise list of commonly used regex syntax for quick reference.
  • Regex Examples: Interactive examples to test and visualize regex patterns in real-time.
  • Execution Time Measurement: Measures and reports the execution time of regex operations.
  • Regex Diagram Generation: Generates and visualizes regex patterns using SVG diagrams.
  • Regex Substitution Function: Supports regex-based string substitution.
  • Ruby Code Snippet Generation: Automatically generates Ruby code snippets for testing regex patterns.
  • Web Interface for Regex Testing: Interactive web UI to test and visualize regular expressions in real-time.
  • Permalink / Shareable URL generation: Create shareable URLs that encode the editor state (regex, sample text, and options) for easy reproduction.
  • ReDoS Check Integration: Check regular expressions for ReDoS vulnerabilities via embedded recheck Playground with one-click pattern copying. (#306)

Supported Scope of Regexp::Parser Used for SVG Output in Railroad Diagrams

  • Alternation: a\|b\|c

  • Anchors: \A, ^, \b

  • Character Classes: [abc], [^\\], [a-d&&aeiou]

  • Character Types: \d, \H, \s

  • Cluster Types: \R, \X

  • Conditional Expressions: (?(cond)yes-subexp), (?(cond)yes-subexp\|no-subexp)

  • Escape Sequences: \t, \\+, \?

  • Free Space: whitespace and # Comments (x modifier)

  • Grouped Expressions:

    • Assertions:
      • Lookahead: (?=abc)
      • Negative Lookahead: (?!abc)
      • Lookbehind: (?<=abc)
      • Negative Lookbehind: (?<!abc)
    • Atomic: (?>abc)
    • Absence: (?~abc)
  • Back-references:

    • Named: \k<name>
    • Nest Level: \k<n-1>
    • Numbered: \k<1>
    • Relative: \k<-2>
    • Traditional: \1 through \9
  • Capturing: (abc)

  • Comments: (?# comment text)

  • Named Captures: (?<name>abc), (?'name'abc)

  • Options: (?mi-x:abc), (?a:\s\w+), (?i)

  • Passive Captures: (?:abc)

  • Subexpression Calls: \g<name>, \g<1>

  • Keep: \K, (ab\Kc\|d\Ke)f

  • Literals (utf-8):

    • Ruby, ルビー, روبي
  • POSIX Classes:

    • [:alpha:], [:^digit:]
  • Quantifiers:

    • Greedy: ?, *, +, {m,M}
    • Reluctant (Lazy) [1]: ??, *?, +?
    • Possessive [1]: ?+, *+, ++
  • String Escapes:

    • Control: \C-C, \cD
    • Hex: \x20, \xE2\x82\xAC
    • Meta [2]: \M-c, \M-\C-C, \M-\cC, \C-\M-C, \c\M-C
    • Octal: \0, \01, \012
    • Unicode: \uHHHH, \u{H+ H+}
  • Unicode Properties (Unicode 15.0.0):

    • Age: \p{Age=5.2}, \P{age=7.0}, \p{^age=8.0}
    • Blocks: \p{InArmenian}, \P{InKhmer}, \p{^InThai}
    • Classes: \p{Alpha}, \P{Space}, \p{^Alnum}
    • Derived: \p{Math}, \P{Lowercase}, \p{^Cased}
    • General Categories: \p{Lu}, \P{Cs}, \p{^sc}
    • Scripts: \p{Arabic}, \P{Hiragana}, \p{^Greek}
    • Simple: \p{Dash}, \p{Extender}, \p{^Hyphen}

[1]: Simple forms (*?, +?, ??, *+, ++, ?+) are accepted and rendered with a "(lazy)" or "(possessive)" comment label in the diagram. Range forms ({m,M}?, {m,M}+) raise an error — the railroad_diagrams gem does not support the range + lazy/possessive combination.

[2]: As of Ruby 3.1, meta and control sequences are pre-processed to hex escapes when used in Regexp literals, so they only appear as Meta/Control nodes when a String or a Regexp built with ::new is parsed. In Rubree, entering \M-c in UTF-8 mode raises a RegexpError before diagram generation — support requires Regexp::NOENCODING handling.


For more detailed information about supported syntax, refer to the official documentation: Supported Syntax - Regexp::Parser GitHub README