Ogex, the regex we deserved
  • Rust 94.6%
  • Python 3.1%
  • HTML 1%
  • TypeScript 0.6%
  • JavaScript 0.4%
  • Other 0.3%
Find a file
NiX 2364d2b1b1
ci: publish npm under @ogex org (#73)
* fix: add version to ogex-cli dependency, remove deprecated --no-build-hook flag

* ci: publish npm under @ogex org instead of @ogex-nu

- Changed wasm-pack scope from --scope ogex-nu to --scope ogex
- Updated job name to reflect @ogex/ogex package
- Updated PR comment to show correct npm package name
2026-03-26 00:11:18 +03:00
.githooks 0.1.1 version release (#1) 2026-03-24 20:40:06 +03:00
.github ci: publish npm under @ogex org (#73) 2026-03-26 00:11:18 +03:00
ogex 0.1.1 version release (#1) 2026-03-24 20:40:06 +03:00
ogex-cli Release v0.1.1 (#34) 2026-03-24 21:27:37 +03:00
ogex-python 0.1.1 version release (#1) 2026-03-24 20:40:06 +03:00
.gitignore 0.1.1 version release (#1) 2026-03-24 20:40:06 +03:00
Cargo.toml 0.1.1 version release (#1) 2026-03-24 20:40:06 +03:00
LICENSE Initial commit 2026-02-19 22:20:02 +03:00
MIGRATION.md docs: add migration guide from traditional regex to Ogex 2026-02-21 23:15:06 +03:00
README.md 0.1.1 version release (#1) 2026-03-24 20:40:06 +03:00
test_ogex.html refactor(rename): more complete renaming of ogex-core and ogex_core to 2026-02-21 23:52:34 +03:00
test_ogex.py test: add test files for WASM and Python bindings 2026-02-21 21:23:09 +03:00
test_ogex.ts refactor(rename): more complete renaming of ogex-core and ogex_core to 2026-02-21 23:52:34 +03:00
test_ogex_node.mjs refactor(rename): more complete renaming of ogex-core and ogex_core to 2026-02-21 23:52:34 +03:00

Ogex

A custom regex engine with unified syntax for named groups and backreferences.

Overview

Ogex introduces a cleaner, more intuitive syntax for named capturing groups and backreferences:

  • Named groups: (name:pattern) instead of (?<name>pattern)
  • Backreferences: \g{name} or \g{1} instead of \k<name> or \1
  • Works identically in patterns and replacement strings

The engine is written in Rust for performance and provides bindings for multiple languages.

Crates

Crate Description
ogex Core regex library (Rust)
ogex-cli CLI tool
ogex-python Python bindings

Quick Start

Rust

See ogex/README.md

JavaScript/WASM

import { Regex } from '@ogex/ogex';

const regex = new Regex('(name:hello)');
const match = regex.find('hello world');
console.log(match.text);  // "hello"

Python

import ogex

regex = ogex.Regex(r"(name:\w+) is \g{name}")
match = regex.search("John is John")
print(match.named_group("name"))  # "John"

CLI

# Test a pattern
ogex test "(name:hello)" "hello world"

# Convert syntax
ogex convert "(name:abc)"
# Output: (?<name>abc)

License

  • ogex: MPL-2.0
  • ogex-cli: MIT