re2
RE2 is a fast, safe, thread-friendly alternative to backtracking regular expression engines like those used in PCRE, Perl, and Python. It is a C++ library.
File Explorer
Download Latest Version (.zip)- metadata.template.json
- presubmit.yml
- source.template.json
- ci-bazel.yml
- ci-cmake.yml
- ci.yml
- pages.yml
- python.yml
- release-bazel.yml
- release.yml
- bazel.sh
- cmake.sh
- _re2.cc
- _re2.d.ts
- app.ts
- BUILD.bazel
- build.sh
- index.html
- package.json
- rollup.config.js
- tsconfig.json
- benchlog.c2
- benchlog.mini
- benchlog.r70
- benchlog.wreck
- benchplot.py
- mktable
- mksyntaxgo
- mksyntaxhtml
- mksyntaxwiki
- syntax.html
- syntax.txt
- commit-msg.hook
- generate.py
- _re2.cc
- BUILD.bazel
- LICENSE
- re2.py
- re2_test.py
- README
- setup.py
- re2_fuzzer.cc
- backtrack.cc
- charclass_test.cc
- compile_test.cc
- dfa_test.cc
- dump.cc
- exhaustive1_test.cc
- exhaustive2_test.cc
- exhaustive3_test.cc
- exhaustive_test.cc
- exhaustive_tester.cc
- exhaustive_tester.h
- filtered_re2_test.cc
- mimics_pcre_test.cc
- null_walker.cc
- parse_test.cc
- possible_match_test.cc
- random_test.cc
- re2_arg_test.cc
- re2_test.cc
- regexp_benchmark.cc
- regexp_generator.cc
- regexp_generator.h
- regexp_test.cc
- required_prefix_test.cc
- search_test.cc
- set_test.cc
- simplify_test.cc
- string_generator.cc
- string_generator.h
- string_generator_test.cc
- tester.cc
- tester.h
- bitmap256.cc
- bitmap256.h
- bitstate.cc
- compile.cc
- dfa.cc
- filtered_re2.cc
- filtered_re2.h
- make_perl_groups.pl
- make_unicode_casefold.py
- make_unicode_groups.py
- mimics_pcre.cc
- nfa.cc
- onepass.cc
- parse.cc
- perl_groups.cc
- pod_array.h
- prefilter.cc
- prefilter.h
- prefilter_tree.cc
- prefilter_tree.h
- prog.cc
- prog.h
- re2.cc
- re2.h
- regexp.cc
- regexp.h
- set.cc
- set.h
- simplify.cc
- sparse_array.h
- sparse_set.h
- stringpiece.h
- tostring.cc
- unicode.py
- unicode_casefold.cc
- unicode_casefold.h
- unicode_groups.cc
- unicode_groups.h
- walker-inl.h
- malloc_counter.h
- pcre.cc
- pcre.h
- rune.cc
- strutil.cc
- strutil.h
- utf.h
- .bazelrc
- .gitignore
- BUILD.bazel
- CMakeLists.txt
- CONTRIBUTING.md
- libre2.symbols
- libre2.symbols.darwin
- LICENSE
- Makefile
- MODULE.bazel
- re2.pc.in
- re2Config.cmake.in
- README.md
- runtests
- SECURITY.md
- testinstall.cc
- ucs2.diff
- WORKSPACE.bazel
- WORKSPACE.bzlmod
# Installation Guide
git clone https://github.com/google/re2
Downloads the entire project code from GitHub to your computer.
cd re2
Moves into the project folder you just downloaded.
2. Official Install Script
Easy Recommended- Go Go is required to use go install.
go install github.com/bazelbuild/bazelisk@latest
Downloads and installs the specified version directly β no need to clone the repo yourself.
Pulled directly from this repo's README.
3. CMake
Mediumcmake -DRE2_TEST=ON -DRE2_BENCHMARK=ON -S . -B build
Type this command into your terminal and run it.
Pulled directly from this repo's README.
4. Node.js
Easycd app
This project's files live in a subfolder, so move into it first.
npm install
Downloads and installs the libraries listed in package.json.
npm start
Starts the development/run server.
5. Python
Easypip install .
Installs the package published on PyPI directly β no need to clone the source.
python <μ€νν νμΌλͺ
>.py # READMEμμ μ νν μ€ν νμΌλͺ
μ νμΈνμΈμ
Runs the Python script (or module).
6. Make
Medium- Git Needed to download the project code from GitHub.
- Make Usually pre-installed on Linux/macOS. On Windows, install separately (e.g. via MSYS2 or WSL).
make
Compiles the code based on the generated build configuration to produce an executable.
make test
Compiles the code based on the generated build configuration to produce an executable.
make benchmark
Compiles the code based on the generated build configuration to produce an executable.
make install
Compiles the code based on the generated build configuration to produce an executable.
make testinstall
Compiles the code based on the generated build configuration to produce an executable.
Pulled directly from this repo's README.
