regex VS node-re2

Compare regex vs node-re2 and see what are their differences.

regex

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

node-re2

node.js bindings for RE2: fast, safe alternative to backtracking regular expression engines. (by uhop)
Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
regex node-re2
91 2
3,336 469
1.8% -
9.1 8.2
13 days ago about 2 months ago
Rust JavaScript
Apache License 2.0 GNU General Public License v3.0 or later
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

regex

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 2024-01-24.

node-re2

Posts with mentions or reviews of node-re2. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2021-08-28.
  • [AskJS] Optional maximum evaluation time for RegExp
    3 projects | /r/javascript | 28 Aug 2021
    There are regex automata implementations like RE2 which guarantee execution in linear time and essentially solve this issue. You could consider node-re2 and re2-wasm if you're handling user-supplied regexes. Though note that back-tracking engines are faster on non-pathological input which is why they're the default.
  • Is there a node tutorial that's specifically made to show people how to use various popular C++ addons to improve performance?
    2 projects | /r/node | 23 Apr 2021
    A good way to approach writing native addons could be: * Read this intro article https://blog.sqreen.com/building-a-native-add-on-for-node-js-in-2019/ (disclaimer, I wrote this one) * Read the source code of some simple addon examples (https://github.com/uhop/node-re2, https://github.com/kelektiv/node.bcrypt.js#readme) * read the nodejs doc on native addons * read the libuv book if you want to handle asynchronous stuff in your addons * read Node.js source code

What are some alternatives?

When comparing regex and node-re2 you can also consider the following projects:

re2 - modern regular expression syntax everywhere with a painless upgrade path [Moved to: https://github.com/SonOfLilit/kleenexp]

re2-wasm

zig - General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.

grex - A command-line tool and Rust library with Python bindings for generating regular expressions from user-provided test cases

ngrams - (Read-only) Generate n-grams

SwiftLinkPreview - It makes a preview from an URL, grabbing all the information such as title, relevant texts and images.

regex-benchmark - It's just a simple regex benchmark of different programming languages.

foxreplace - Replace text in webpages

whatlang-rs - Natural language detection library for Rust. Try demo online: https://whatlang.org/

grex-js - A JavaScript / WebAssembly library for generating regular expressions from user-provided test cases

Fluent - Rust implementation of Project Fluent

rust - Rust for the xtensa architecture. Built in targets for the ESP32 and ESP8266