Hacker ApprovedDepartments

regex crate for Rust

The most recommended of 4 regex libraries

Widely treated as the standard Rust regex library, praised for speed and bounded worst-case time. Critics say it drops language features to avoid infinite loops.

Widely treated as the standard Rust regex library, praised for speed and bounded worst-case time. Critics say it drops language features to avoid infinite loops.

12 people gave an opinion

recommend it
9
criticize it
3
approval share
75%
Each figure is one person. RecommendsCriticizes

Recommended in 5 of 13 months

  1. November 2025: not recommended
  2. December 2025: not recommended
  3. January 2026: recommended
  4. February 2026: recommended
  5. March 2026: recommended
  6. April 2026: not recommended
  7. May 2026: not recommended
  8. June 2026: not recommended
  9. July 2026: not recommended
  10. August 2026: recommended
  11. September 2026: recommended
  12. October 2026: not recommended
  13. November 2026: not recommended (month in progress)

Why it doesn’t carry the badge

  • 9 people recommend itNeeds 10 or more, not met.
  • 3 recommenders for every criticNeeds 2 to 1 or better, met.
  • Recommended in 5 of 13 monthsNeeds 4 or more, met.

The same three rules apply to every product, and the badge can’t be bought. How the badge works

What people say about it

The reasons people give, with the number of comments that give each one. Open a reason to read what they said.

Why people recommend it

Each mark is one comment

  • Fast, strong performance

    “the rust regex engine has really good performance when it comes to the constants too”

    Comment from 25 Mar 2026 in “Ripgrep is faster than {grep, ag, Git grep, ucg, pt, sift}”

    “Finally, a demonstration of C-like speed”

    Comment from 6 Jan 2026 in “C Is Best”
  • De facto standard Rust library

    “Rust's regex crate where the best third-party solution gets blessed into a first-party package”

    Comment from 24 Feb 2026 in “What it means that Ubuntu is using Rust”

    “These aren't randos, these are all de-facto first party libraries.”

    Comment from 21 Aug 2026 in “Malicious Rust Crate Arrayref Runs a Build-Time Payload”

    “the defacto standard regex library in Rust”

    Comment from 24 Mar 2026 in “Ripgrep is faster than {grep, ag, Git grep, ucg, pt, sift}”
  • Audited and well maintained

    “The core packages (things like rand and regex) are pretty closely audited in practice”

    Comment from 20 Aug 2026 in “Malicious Rust Crate Arrayref Runs a Build-Time Payload”

    “The top hundred are efficient, concise, well-maintained crates”

    Comment from 20 Aug 2026 in “Malicious Rust Crate Arrayref Runs a Build-Time Payload”

Other regex libraries people recommend

The three most recommended other regex libraries, with the same counts for each, so you can compare like for like. The tick on each bar marks the 2 to 1 line the badge needs.

regex crate for Rust compared with 3 alternatives
ProductRecommendCriticizeApprovalMonthsOwnedBadge
regex crate for RustThis page9375%5——
PCRE6460%5——
regex-utils50100%3——
RE# regex engine5183%1——
See all 4 regex libraries, ranked

What people said

14 of the 15 comments that mention it, newest first. Each links to the original comment.

“avoids the possibility of infinite loops by just dropping half the features of the language”

CriticizesComment from 26 Sep 2026 in “Parsing Expression Grammar vs. Regexes: Building Org Parser in Lisp, Export HTML”

“Medium level: Regex (Rust crate)”

RecommendsComment from 11 Sep 2026 in “Bitap: My favorite string matching algorithm”

“Regex is absolutely not suitable for most use cases that I have come across.”

CriticizesComment from 21 Aug 2026 in “Malicious Rust Crate Arrayref Runs a Build-Time Payload”

“These aren't randos, these are all de-facto first party libraries.”

RecommendsComment from 21 Aug 2026 in “Malicious Rust Crate Arrayref Runs a Build-Time Payload”

“there are other modules that have far better replacements on PyPi too (re vs regex for example)”

RecommendsComment from 20 Aug 2026 in “Malicious Rust Crate Arrayref Runs a Build-Time Payload”

“The top hundred are efficient, concise, well-maintained crates”

RecommendsComment from 20 Aug 2026 in “Malicious Rust Crate Arrayref Runs a Build-Time Payload”

“The core packages (things like rand and regex) are pretty closely audited in practice”

RecommendsComment from 20 Aug 2026 in “Malicious Rust Crate Arrayref Runs a Build-Time Payload”

“overengineered bloatware regex”

CriticizesComment from 1 Aug 2026 in “June in Servo: real world compat, media queries, SharedWorker, and more”

“deliberately puts a reasonable upper bound on worst-case time complexity”

RecommendsComment from 28 Mar 2026 on Hacker News

“the rust regex engine has really good performance when it comes to the constants too”

RecommendsComment from 25 Mar 2026 in “Ripgrep is faster than {grep, ag, Git grep, ucg, pt, sift}”

“the defacto standard regex library in Rust”

RecommendsComment from 24 Mar 2026 in “Ripgrep is faster than {grep, ag, Git grep, ucg, pt, sift}”

“Rust's regex crate where the best third-party solution gets blessed into a first-party package”

RecommendsComment from 24 Feb 2026 in “What it means that Ubuntu is using Rust”

“Finally, a demonstration of C-like speed”

RecommendsComment from 6 Jan 2026 in “C Is Best”

“most people will just depend on it directly if they need that functionality”

RecommendsComment from 6 Jan 2026 in “Brave overhauled its Rust adblock engine with FlatBuffers, cutting memory 75%”

Counts come from 1,795,640 Hacker News comments, November 2025 to November 2026. How we count. Report a mistake.