kkos/oniguruma logo

kkos/oniguruma

Free

regular expression library

FreeFree tier
Type
Open Source

About kkos/oniguruma

Oniguruma is a modern and flexible regular expression library that combines features from different regular expression implementations. It supports specifying character encoding per regular expression object, with support for a wide range of encodings including ASCII, UTF-8, UTF-16BE/LE, UTF-32BE/LE, EUC-JP, EUC-TW, EUC-KR, EUC-CN, Shift_JIS, Big5, GB18030, KOI8-R, CP1251, and many ISO-8859 variants. The library offers advanced API options such as ONIG_OPTION_MATCH_WHOLE_STRING and ONIG_OPTION_CALLBACK_EACH_MATCH, and includes Unicode property support and new operators like (*SKIP). Note: The project was archived on April 24, 2025 and is no longer actively maintained.

Key Features

Modern and flexible regex engine
Supports multiple character encodings (ASCII, UTF-8, UTF-16, EUC-JP, Shift_JIS, etc.)
Features from different regex implementations
Character encoding per regex object
New API options: ONIG_OPTION_MATCH_WHOLE_STRING, ONIG_OPTION_CALLBACK_EACH_MATCH
Unicode property support (\pC, \pL, etc.)
New operator (*SKIP)

Pros & Cons

Pros
  • Modern and flexible design
  • Wide range of supported character encodings
  • Combines features from multiple regex flavors
  • Advanced API options for precise matching
  • Free and open source under BSD-like license
Cons
  • Project is archived and no longer maintained (as of April 2025)
  • POSIX API compatibility changes may break older code
  • Not designed for AI-specific tasks

Best For

Text pattern matching and validationSearch and replace in text processingData extraction from stringsRegular expression testing and development

FAQ

What is Oniguruma?
Oniguruma is a modern and flexible regular expression library that supports multiple character encodings and features from different regex implementations.
Is Oniguruma still maintained?
As of April 24, 2025, the official repository was archived and is now read-only, indicating that active development has ceased.
What character encodings does Oniguruma support?
It supports a wide range including ASCII, UTF-8, UTF-16BE/LE, UTF-32BE/LE, EUC-JP, EUC-TW, EUC-KR, EUC-CN, Shift_JIS, Big5, GB18030, KOI8-R, CP1251, and many ISO-8859 variants.
How can I install Oniguruma?
The library can be built from source using the provided configure script, CMake, or makefiles for Windows. Installation instructions are available in the INSTALL file and the project's README.