macOS
brew install pcre2local Homebrew formula metadata
brew / rank 11
Perl compatible regular expressions library with a new API. Version 10.49 via Homebrew; verified 2026-09-29. Also installable with debian: sudo apt install libpcre2-16-0.
install
brew install pcre2local Homebrew formula metadata
sudo apk add pcre2Alpine Linux edge package indexes · pcre2 · source: dl-cdn.alpinelinux.org
sudo dnf install pcre2Fedora Rawhide package metadata · pcre2 · source: dl.fedoraproject.org
nix profile install nixpkgs#pcre2nixpkgs package indexes · pkgs/by-name/pc/pcre2/package.nix · source: api.github.com
sudo pacman -S pcre2Arch Linux sync databases · pcre2 · source: geo.mirror.pkgbuild.com
sudo apt install libpcre2-16-0Debian stable package indexes · libpcre2-16-0 · source: deb.debian.org
sudo zypper install libpcre2-16-0openSUSE Tumbleweed package metadata · libpcre2-16-0 · source: download.opensuse.org
scoop install main/pcre2grepScoop official bucket manifest trees · bucket/pcre2grep.json · source: api.github.com
overview
Perl compatible regular expressions library with a new API
history
PCRE2 is the maintained Perl-Compatible Regular Expressions library, providing C APIs for pattern compilation and matching, Unicode support, multiple code-unit widths, and optional JIT compilation.
PCRE2 was created after nearly two decades of the original API made further development difficult. The redesign introduced a more extensible interface, automatic optimization, refactored internals, and new functionality under distinct pcre2-prefixed APIs.
The first PCRE2 release established a successor line rather than a drop-in replacement. The original library is now obsolete, while PCRE2 continues as the maintained project.
PCRE2 became the maintained PCRE generation for applications and language bindings needing Perl-compatible matching without embedding Perl. Separate library names allow it to coexist with legacy PCRE during migrations.
Its self-contained, permissively licensed implementation is consumed directly by software and indirectly through runtimes, bindings, and command-line tools.
Developers link libpcre2-8, libpcre2-16, or libpcre2-32 according to the required code-unit width and use the compile and match APIs.
pcre2grep supplies command-line searching, pcre2test supports pattern experiments and diagnostics, and pcre2-config reports build settings.
PCRE2 has no documented runtime configuration or credentials file; Unicode, JIT, and related capabilities are primarily build-time features controlled through APIs at runtime.
PCRE2 is a foundational library in many dependency graphs. Maintainers care about its distinct 8-, 16-, and 32-bit code-unit libraries, optional Unicode and JIT features, and its deliberate ABI break from PCRE1.
The pcre2grep and pcre2test utilities also make the package useful outside compiled applications for searching, experimentation, and diagnostics.
security posture
library-like package without higher-risk signals.
green risk · low confidence · appliance
Before unattended agent use, check whether the tool reads plaintext credentials, writes remote state, publishes artifacts, or shells out to plugins.
executables
| Command | Kind | Exposure | Note |
|---|---|---|---|
pcre2-config | cli | global executable | |
pcre2grep | cli | global executable | |
pcre2test | cli | global executable |
freshness
These signals separate page generation age, package-manager activity, and upstream release comparison. Version lag is warned only when an evidence URL and comparable versions are present.
https://github.com/PCRE2Project/pcre2
install metadata
| Package key | brew:pcre2 |
|---|---|
| Version | 10.49 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/pcre2 |
| Homepage | https://www.pcre.org/ |
| Repository | https://github.com/PCRE2Project/pcre2 |
| Upstream docs | https://www.pcre.org/ |
| License | BSD-3-Clause |
| Source archive | https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.49/pcre2-10.49.tar.bz2 |
| Last updated | 2026-09-29T02:35:55Z |
| Pulse | updated |
| Uses from macOS | bzip2 |
| Bottle | available (on arm64_golden_gate, arm64_linux, arm64_sequoia, arm64_tahoe, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | pcre2 |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
source database matches
Matches are pulled from external package-manager indexes and kept separate from local Automic Vault package links.
libpcre2-16-0 10.46-1~deb13u1
New Perl Compatible Regular Expression Library - 16 bit runtime files
https://github.com/PCRE2Project/pcre2
sudo apt install libpcre2-16-0libpcre2-32-0 10.46-1~deb13u1
New Perl Compatible Regular Expression Library - 32 bit runtime files
https://github.com/PCRE2Project/pcre2
sudo apt install libpcre2-32-0libpcre2-8-0 10.46-1~deb13u1
New Perl Compatible Regular Expression Library- 8 bit runtime files
https://github.com/PCRE2Project/pcre2
sudo apt install libpcre2-8-0libpcre2-dev 10.46-1~deb13u1
New Perl Compatible Regular Expression Library - development files
https://github.com/PCRE2Project/pcre2
sudo apt install libpcre2-devlibpcre2-posix3 10.46-1~deb13u1
New Perl Compatible Regular Expression Library - posix-compatible runtime files
https://github.com/PCRE2Project/pcre2
sudo apt install libpcre2-posix3pcre2-utils 10.46-1~deb13u1
New Perl Compatible Regular Expression Library - utilities
https://github.com/PCRE2Project/pcre2
sudo apt install pcre2-utilspcre2
nix profile install nixpkgs#pcre2libpcre2-16-0 10.42-4ubuntu2
New Perl Compatible Regular Expression Library - 16 bit runtime files
sudo apt install libpcre2-16-0libpcre2-32-0 10.42-4ubuntu2
New Perl Compatible Regular Expression Library - 32 bit runtime files
sudo apt install libpcre2-32-0libpcre2-8-0 10.42-4ubuntu2
New Perl Compatible Regular Expression Library- 8 bit runtime files
sudo apt install libpcre2-8-0libpcre2-dev 10.42-4ubuntu2
New Perl Compatible Regular Expression Library - development files
sudo apt install libpcre2-devlibpcre2-posix3 10.42-4ubuntu2
New Perl Compatible Regular Expression Library - posix-compatible runtime files
sudo apt install libpcre2-posix3pcre2-utils 10.42-4ubuntu2
New Perl Compatible Regular Expression Library - utilities
sudo apt install pcre2-utilslibpcre2-16 10.47-r1
PCRE2 with 16 bit character support
sudo apk add libpcre2-16libpcre2-32 10.47-r1
PCRE2 with 32 bit character support
sudo apk add libpcre2-32pcre2 10.47-r1
Perl-compatible regular expression library
sudo apk add pcre2source trail
This page is generated by av-web from the private package SQLite artifact built by scripts/generate-pkg-sqlite.py.
View the package source record on GitHub.