macOS
brew install pcrelocal Homebrew formula metadata
sudo port install pcreMacPorts ports tree · devel/pcre/Portfile · source: api.github.com
brew / rank 686
Perl compatible regular expressions library. Version 8.45 via Homebrew; verified 2026-09-10. Also installable with nix: nix profile install nixpkgs#pcre.
install
brew install pcrelocal Homebrew formula metadata
sudo port install pcreMacPorts ports tree · devel/pcre/Portfile · source: api.github.com
sudo apk add pcreAlpine Linux edge package indexes · pcre · source: dl-cdn.alpinelinux.org
nix profile install nixpkgs#pcrenixpkgs package indexes · pkgs/by-name/pc/pcre/package.nix · source: api.github.com
sudo pacman -S pcreArch Linux sync databases · pcre · source: geo.mirror.pkgbuild.com
sudo apt install pcregrepUbuntu 24.04 LTS package indexes · pcregrep · source: archive.ubuntu.com
scoop install main/pcregrepScoop official bucket manifest trees · bucket/pcregrep.json · source: api.github.com
overview
Perl compatible regular expressions library
history
PCRE, now commonly called PCRE1, is Philip Hazel's C library implementing Perl-compatible regular-expression matching. The Homebrew pcre formula represents the legacy 8.x API rather than its actively maintained successor, PCRE2.
Philip Hazel wrote PCRE at the University of Cambridge as a C implementation of regular-expression matching broadly compatible with Perl syntax and semantics.
The original series expanded from an 8-bit library to optional 16-bit support in release 8.30 and 32-bit support in 8.32. A redesigned API appeared as PCRE2 10.00 in January 2015.
PCRE1 concluded with release 8.45. The official documentation now describes it as obsolete and unmaintained while retaining its manuals for existing applications.
PCRE became a widely packaged compatibility layer for Perl-style regular expressions in C and in software embedding a C regex engine. The supplied metadata records availability across Homebrew, Alpine, Arch, Nix, MacPorts, Scoop, and Ubuntu ecosystems.
The original API remains relevant for legacy consumers, but the official documentation marks PCRE1 end-of-life and advises new projects to use PCRE2.
Developers link libpcre, libpcre16, or libpcre32 to compile and match Perl-style patterns from C or through language bindings. The legacy distribution also offers a restricted POSIX wrapper and a C++ wrapper.
pcregrep applies PCRE matching from the command line, pcretest exercises patterns and library behavior, and pcre-config reports build and linkage settings.
PCRE has no documented per-user credentials or runtime configuration file; its feature set is principally selected at build time and queried programmatically or with pcre-config.
PCRE helped make Perl-like regex syntax available outside the Perl runtime through a small, embeddable C library. Package maintainers care about the distinction between the ABI-incompatible PCRE1 and PCRE2 families because migration requires source changes rather than a simple library replacement.
The package also supplies pcregrep, pcretest, and pcre-config, making it both a development dependency and a useful command-line regex toolkit.
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 |
|---|---|---|---|
pcre-config | cli | global executable | |
pcregrep | cli | global executable | |
pcretest | 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.
install metadata
| Package key | brew:pcre |
|---|---|
| Version | 8.45 |
| Package manager | Homebrew |
| Package manager page | https://formulae.brew.sh/formula/pcre |
| Homepage | https://www.pcre.org/ |
| Upstream docs | https://www.pcre.org/ |
| License | BSD-3-Clause |
| Source archive | https://downloads.sourceforge.net/project/pcre/pcre/8.45/pcre-8.45.tar.bz2 |
| Last updated | 2026-09-10T23:22:41Z |
| Pulse | updated |
| Uses from macOS | bzip2 |
| Bottle | available (on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | not defined |
| Service | none declared |
registry facts
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | pcre |
| Aliases |
|
| Version Scheme | 0 |
| Revision | 0 |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | yes |
| 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.
pcre
nix profile install nixpkgs#pcrelibpcre16 8.45-r4
PCRE with 16 bit character support
sudo apk add libpcre16libpcre32 8.45-r4
PCRE with 32 bit character support
sudo apk add libpcre32libpcrecpp 8.45-r4
C++ bindings for PCRE
sudo apk add libpcrecpppcre 8.45-r4
Perl-compatible regular expression library
sudo apk add pcrepcre-dev 8.45-r4
Perl-compatible regular expression library (development files)
sudo apk add pcre-devpcre-doc 8.45-r4
Perl-compatible regular expression library (documentation)
sudo apk add pcre-docpcre-static 8.45-r4
Perl-compatible regular expression library (static library)
sudo apk add pcre-staticpcre-tools 8.45-r4
Auxiliary utilities for PCRE
sudo apk add pcre-toolspcre 8.45-5
A deprecated library that implements Perl 5-style regular expressions
sudo pacman -S pcrepcre
sudo port install pcrepcregrep 2:8.39-15build1
grep utility that uses perl 5 compatible regexes.
sudo apt install pcregrepmain/pcregrep
scoop install main/pcregrepsource 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.