New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

gitea.twomorecents.org/rockingcool/kleingrep

Package Overview
Dependencies
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitea.twomorecents.org/rockingcool/kleingrep

Go Modules
Version
v0.7.0
Version published
Created
Source

Kleingrep

Kleingrep is a regular expression engine, providing a library and command-line tool written in Go.

It aims to provide a more featureful engine, compared to the one in Go's regexp, while retaining some semblance of efficiency.

The engine does not use backtracking, relying on the NFA-based method described in Russ Cox's articles. As such, it is immune to catastrophic backtracking.

It also includes features not present in regexp, such as lookarounds and backreferences.

Syntax

The syntax is, for the most part, a superset of Go's regexp. A full overview of the syntax can be found here.

For more information, see https://pkg.go.dev/gitea.twomorecents.org/Rockingcool/kleingrep/regex.

How it works

I've written about the inner workings of the engine on my blog.

FAQs

Package last updated on 21 Apr 2025

Related posts