.NET Wrapper for latest PCRE2 library
github.com·12h·
Discuss: Hacker News
🔤Text Processing
Preview
Report Post

PCRE.NET

Perl Compatible Regular Expressions for .NET

PCRE.NET is a .NET wrapper for the PCRE2 library.

The library provides variants for UTF-16 (.NET string and ReadOnlySpan<char>) and 8-bit encodings such as UTF-8 (ReadOnlySpan<byte>).

The following systems are supported:

  • Windows x64
  • Windows x86
  • Linux x64
  • Linux arm64
  • macOS arm64
  • macOS x64

API Types

The classic API

This is a friendly API that is very similar to .NET’s System.Text.RegularExpressions. It works on string objects, and supports the following operations:

  • NFA matching and substring extraction:

  • Matches

  • Match

  • IsMatch

  • Matched string replacement:

  • Using Replace, the PCRE.NET API:

  • Callbacks: `Func<PcreMatch, str…

Similar Posts

Loading similar posts...