Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/scorpionknifes/go-pcre
PCRE for Go with Windows, Linux & MacOS support
https://github.com/scorpionknifes/go-pcre
Last synced: 1 day ago
JSON representation
PCRE for Go with Windows, Linux & MacOS support
- Host: GitHub
- URL: https://github.com/scorpionknifes/go-pcre
- Owner: scorpionknifes
- License: other
- Created: 2021-08-04T15:54:38.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-08-31T18:14:34.000Z (about 3 years ago)
- Last Synced: 2024-06-19T02:04:55.248Z (5 months ago)
- Language: C
- Size: 505 KB
- Stars: 18
- Watchers: 2
- Forks: 6
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-pcre
[![GoDoc](https://godoc.org/github.com/gijsbers/go-pcre?status.svg=)](https://pkg.go.dev/github.com/scorpionknifes/go-pcre) [![Test](https://github.com/scorpionknifes/go-pcre/actions/workflows/test.yml/badge.svg)](https://github.com/scorpionknifes/go-pcre/actions/workflows/test.yml)
This is a Go language package providing support for Perl Compatible Regular Expressions (PCRE).
This version is created from [go-pcre](https://github.com/rubrikinc/goc-pcre) to allow windows support.
Current version is PCRE 8.45
## Features:
- Support Windows, Linux & MacOS
- Statically build into your application## Installation
Install the package with the following:
go get github.com/scorpionknifes/go-pcre
## Usage
Go programs that depend on this package should import this package as follows to allow automatic downloading:
import "github.com/scorpionknifes/go-pcre"
## History
This is a clone of [go-pcre](https://github.com/rubrikinc/goc-pcre)
This was a clone of [golang-pkg-pcre](http://git.enyo.de/fw/debian/golang-pkg-pcre.git) by Florian Weimer, which has been placed on Github by Glenn Brown, so it can be fetched automatically by Go's package installer.
Glenn Brown added `FindIndex()` and `ReplaceAll()` to mimic functions in Go's default regexp package.
Mathieu Payeur Levallois added `Matcher.ExtractString()`.
Malte Nuhn added `GroupIndices()` to retrieve positions of a matching group.
Chandra Sekar S added `Index()` and stopped invoking `Match()` twice in `FindIndex()`.
Misakwa added support for `pkg-config` to locate `libpcre`.
Yann Ramin added `ReplaceAllString()` and changed `Compile()` return type to `error`.
Nikolay Sivko modified `name2index()` to return error instead of panic.
Harry Waye exposed raw `pcre_exec`.
Hazzadous added partial match support.
Pavel Gryaznov added support for JIT compilation.