regex

An implementation of regular expressions for Rust. This implementation uses finite automata and guarantees linear time matching on all inputs. (by rust-lang)

Regex Alternatives

Similar projects and alternatives to regex

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a better regex alternative or higher similarity.

regex reviews and mentions

Posts with mentions or reviews of regex. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-08-13.
  • ScripterC - Rust-lang set
    2 projects | /r/scripterc | 13 Aug 2023
    Dependencies used: - regex - unicode_reader - rust decimal - tokio
  • Regex Engine Internals as a Library
    5 projects | news.ycombinator.com | 5 Jul 2023
    https://www.cs.princeton.edu/courses/archive/fall19/cos226/l... and https://kean.blog/post/lets-build-regex are excellent introductions to implementing a (very) simplified regex engine: construct a nondetermistic finite state automaton for the regex, then perform a graph search on the resulting digraph; if the vertex corresponding to your end state is reachable, you have a match.

    I think this exercise is valuable for anyone writing regexes to not only understand that there's less magic than one might think, but also to visualize a bunch of balls bouncing along an NFA - that bug you inevitably hit in production due to catastrophic backtracking now takes on a physical meaning!

    Separately re: the OP, https://github.com/rust-lang/regex/issues/822 (and specifically BurntSushi's comment at the very end of the issue) adds really useful context to the paragraph in the OP about niche APIs: https://blog.burntsushi.net/regex-internals/#problem-request... - searching with multiple regexes simultaneously against a text is both incredibly complex and incredibly useful, and I can't wait to see what the community comes up with for this pattern!

  • Some positive and negative comments after using rust for a while
    2 projects | /r/rust | 20 May 2023
    Do you think this boilerplate is a good sign?
    2 projects | /r/rust | 20 May 2023
    The ag/regex-automata branch for the regex crate: https://github.com/rust-lang/regex/tree/ag/regex-automata
  • I was wrong about rust
    4 projects | /r/rust | 20 May 2023
    Tangential FYI: I'll be releasing a regex-lite crate soon, which should help binary size and compilation time for cases where you don't care too much about regex performance or Unicode support.
  • regex 1.8.0 released (no-op escapes allowed, (?<name>re) syntax added)
    4 projects | /r/rust | 20 Apr 2023
    The rewrite is done. It's in this PR: https://github.com/rust-lang/regex/pull/978
    4 projects | /r/rust | 20 Apr 2023
    This is a big release, but will be "soon" followed by an even bigger release that rewrites the entire regex crate. The regex crate will be turned into a thin wrapper around regex-automata APIs: https://github.com/rust-lang/regex/pull/978
    4 projects | /r/rust | 20 Apr 2023
  • Introducing Hitori – generic compile-time regular expressions library
    5 projects | /r/rust | 19 Apr 2023
    I'm sorry but that's complete nonsense? The regex crate doesn't backtrack either, by design. And not backtracking is a very desirable property from a security & consistency perspective.
    5 projects | /r/rust | 19 Apr 2023
    While regex has a backtracking engine, it's bounded and only there as an optimisation, and advanced uses via regex-automata should eventually allow disabling it without changing any of the engine's features.
  • A note from our sponsor - Mergify
    blog.mergify.com | 26 Sep 2023
    Solutions like Dependabot or Renovate update but don't merge dependencies. You need to do it manually while it could be fully automated! Add a Merge Queue to your workflow and stop caring about PR management & merging. Try Mergify for free. Learn more →

Stats

Basic regex repo stats
85
3,075
9.1
19 days ago

rust-lang/regex is an open source project licensed under Apache License 2.0 which is an OSI approved license.

The primary programming language of regex is Rust.

Collect and Analyze Billions of Data Points in Real Time
Manage all types of time series data in a single, purpose-built database. Run at any scale in any environment in the cloud, on-premises, or at the edge.
www.influxdata.com