-
-
Notifications
You must be signed in to change notification settings - Fork 166
Alternative Regex Syntax
This page lists projects that provide an alternative to traditional regex syntax, e.g. POSIX [[:digit:]]+
or Perl \d+
.
It's freely editable, so please add your projects here.
Related: Alternative Shells
-
Oil's Egg Expressions
- Translates to POSIX ERE for use with grep, awk, sed
- Literal strings are quoted; operators are unquoted / unescaped
- Reuse and composition of of patterns
-
Raku Grammars
- Literal strings are quoted; operators are unquoted / unescaped
- Verbal Expressions - A JavaScript library that helps to construct difficult regular expressions
- kleenexp - modern regular expression syntax everywhere with a painless upgrade path
- SRL - Simple Regex Language. Regular Expressions Made Simple (Hacker News Comments)
- Super Expressive - A zero-dependency JavaScript library for building regular expressions in (almost) natural language (Hacker News Comments)
- Melody - Melody is a language that compiles to regular expressions and aims to be more easily readable and maintainable
- Re - An OCaml regular expression library, in addition to Perl, Posix, Emacs, Shell and PCRE syntax, it supports writing regexps using declarative higher level combinators
- Tyre - A set of combinators to write type-safe regular expressions, allowing automatic extraction and modification of matched groups. In Ocaml, bidirectional
Lua's Patterns - Lua's pattern-matching is a (deliberate) subset of what POSIX regular expressions can do. As Roberto Ierusalimschy writes in Programming in Lua: "The main reason for this decision is size: a typical implementation of POSIX regular expressions takes more than 4000 lines of code, which is more than half the size of all Lua standard libraries together. In comparison, the implementation of pattern matching in Lua has less than 600 lines" (77, 4th edition).
Wolfram String Patterns -- The Wolfram Language's symbolic string patterns provide a compact yet readable basis for sophisticated string operations. Included directly in programs, or symbolically generated on the fly, ...
- Emacs' Rx Expressions - Structured regex notation based on s-expressions built into Emacs
- Scheme Regular Expressions - first introduced in SCSH as an s-expression based alternative to the more common string based description.
- luna - A Clojure DSL That Translates to Regex (Hacker News Comments)
PEG, etc.
- https://wiki.c2.com/?AlternativesToRegularExpressions (as of 2022, last edited in 2014)