# README
go-pcre
This package is based on github.com/GRbit/go-pcre, but includes many fixes (the buggy *String functions were removed ...)
This package provides Perl-Compatible RegularExpression support in Go using libpcre
or libpcre++
.
Documentation
Use godoc.
Installation
-
install
libpcre3-dev
orlibpcre++-dev
-
go get
sudo apt-get install libpcre3-dev
go get github.com/GRbit/go-pcre/
Usage
Go programs that depend on this package should import this package as follows to allow automatic downloading:
import (
"github.com/GRbit/go-pcre/"
)
Building your software
Since this package use cgo
it will build dynamically linked.
If you plan to use this everywhere without libpcre
dependency,
you should build it statically linked. You can build your software
with the following options:
go build -ldflags="-extldflags=-static"
More details on this here
Performance
https://zherczeg.github.io/sljit/regex_perf.html
LICENSE
This is a fork of go-pcre which is fork of golang-pkg-pcre. The original package hasn't been updated for several years. But it is still being used in some software, despite its lack of JIT compiling, which gives huge speed-up to regexps. If you somehow can send a message to the original project owner, please inform him about this situation. Maybe he would like to transfer control over the repository to a maintainer who will have time to review pull requests.