All Projects → k-takata → Onigmo

k-takata / Onigmo

Licence: other
Onigmo is a regular expressions library forked from Oniguruma.

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Onigmo

Regexpu
A source code transpiler that enables the use of ES2015 Unicode regular expressions in ES5.
Stars: ✭ 201 (-62.5%)
Mutual labels:  regex, regular-expression, regexp
Regaxor
A regular expression fuzzer.
Stars: ✭ 35 (-93.47%)
Mutual labels:  regex, regexp, regular-expression
Regex For Regular Folk
🔍💪 Regular Expressions for Regular Folk — A visual, example-based introduction to RegEx [BETA]
Stars: ✭ 242 (-54.85%)
Mutual labels:  regex, regular-expression, regexp
Regex Dos
👮 👊 RegEx Denial of Service (ReDos) Scanner
Stars: ✭ 143 (-73.32%)
Mutual labels:  regex, regular-expression, regexp
expand-brackets
Expand POSIX bracket expressions (character classes) in glob patterns.
Stars: ✭ 26 (-95.15%)
Mutual labels:  regex, regexp, regular-expression
Grex
A command-line tool and library for generating regular expressions from user-provided test cases
Stars: ✭ 4,847 (+804.29%)
Mutual labels:  regex, regular-expression, regexp
Rex
Your RegEx companion.
Stars: ✭ 283 (-47.2%)
Mutual labels:  regex, regular-expression, regexp
Regexr
For composing regular expressions without the need for double-escaping inside strings.
Stars: ✭ 53 (-90.11%)
Mutual labels:  regex, regular-expression, regexp
Picomatch
Blazing fast and accurate glob matcher written JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.
Stars: ✭ 393 (-26.68%)
Mutual labels:  regex, regular-expression, regexp
regexp-expand
Show the ELisp regular expression at point in rx form.
Stars: ✭ 18 (-96.64%)
Mutual labels:  regex, regexp, regular-expression
Orchestra
One language to be RegExp's Successor. Visually readable and rich, technically safe and extended, naturally scalable, advanced, and optimized
Stars: ✭ 103 (-80.78%)
Mutual labels:  regex, regular-expression, regexp
RgxGen
Regex: generate matching and non matching strings based on regex pattern.
Stars: ✭ 45 (-91.6%)
Mutual labels:  regex, regexp, regular-expression
Hyperscan Java
Match tens of thousands of regular expressions within milliseconds - Java bindings for Intel's hyperscan 5
Stars: ✭ 66 (-87.69%)
Mutual labels:  regex, regular-expression, regexp
Regulex
🚧 Regular Expression Excited!
Stars: ✭ 4,877 (+809.89%)
Mutual labels:  regex, regular-expression, regexp
Emoji Regex
A regular expression to match all Emoji-only symbols as per the Unicode Standard.
Stars: ✭ 1,134 (+111.57%)
Mutual labels:  regex, regular-expression, regexp
moar
Deterministic Regular Expressions with Backreferences
Stars: ✭ 19 (-96.46%)
Mutual labels:  regex, regexp, regular-expression
Commonregex
🍫 A collection of common regular expressions for Go
Stars: ✭ 733 (+36.75%)
Mutual labels:  regex, regular-expression, regexp
cregex
A small implementation of regular expression matching engine in C
Stars: ✭ 72 (-86.57%)
Mutual labels:  regex, regexp, regular-expression
globrex
Glob to regular expression with support for extended globs.
Stars: ✭ 52 (-90.3%)
Mutual labels:  regex, regexp, regular-expression
Regexp2
A full-featured regex engine in pure Go based on the .NET engine
Stars: ✭ 389 (-27.43%)
Mutual labels:  regex, regular-expression, regexp

Build Status Build status Coverage Status Coverity Scan Build Status Code Quality: Cpp Total Alerts

Onigmo (Oniguruma-mod)

https://github.com/k-takata/Onigmo

Onigmo is a regular expressions library forked from Oniguruma. It focuses to support new expressions like \K, \R, (?(cond)yes|no) and etc. which are supported in Perl 5.10+.

Since Onigmo is used as the default regexp library of Ruby 2.0 or later, many patches are backported from Ruby 2.x.

See also the Wiki page: https://github.com/k-takata/Onigmo/wiki

License

BSD license.

Install

Case 1: Unix and Cygwin platform

  1. ./autogen.sh (If configure doesn't exist.)
  2. ./configure
  3. make
  4. make install
  • test

    make test

  • uninstall

    make uninstall

  • configuration check

    onigmo-config --cflags onigmo-config --libs onigmo-config --prefix onigmo-config --exec-prefix

Case 2: Windows 64/32bit platform (Visual C++)

Execute build_nmake.cmd. build_x64 or build_x86 will be used as a working/output directory.

  onigmo_s.lib:  static link library
  onigmo.lib:    import library for dynamic link
  onigmo.dll:    dynamic link library
  • test (ASCII/Shift_JIS/EUC-JP/Unicode)

    Execute build_nmake.cmd test. Python (with the same bitness of Onigmo) is needed to run the tests.

Case 3: Windows 64/32bit platform (MinGW)

Execute mingw32-make -f win32/Makefile.mingw. build_x86-64, build_i686 and etc. will be used as a working/output directory.

  libonigmo.a:     static link library
  libonigmo.dll.a: import library for dynamic link
  onigmo.dll:      dynamic link library
  • test (ASCII/Shift_JIS/EUC-JP/Unicode)

    Execute mingw32-make -f win32/Makefile.mingw test. Python (with the same bitness of Onigmo) is needed to run the tests.

  • If you use MinGW on MSYS2, you can also use ./configure and make like Unix. In this case, DLL name will have API version number. E.g.:

    libonigmo-6.dll

Regular Expressions

See doc/RE or doc/RE.ja for Japanese.

Usage

Include onigmo.h in your program. (Onigmo API) See doc/API for Onigmo API.

If you want to disable UChar type (== unsigned char) definition in onigmo.h, define ONIG_ESCAPE_UCHAR_COLLISION and then include onigmo.h.

If you want to disable regex_t type definition in onigmo.h, define ONIG_ESCAPE_REGEX_T_COLLISION and then include onigmo.h.

Example of the compiling/linking command line in Unix or Cygwin, (prefix == /usr/local case)

cc sample.c -L/usr/local/lib -lonigmo

If you want to use static link library (onigmo_s.lib) in Win32, add option -DONIG_EXTERN=extern to C compiler.

Sample Programs

File Description
sample/simple.c example of the minimum (Onigmo API)
sample/names.c example of the named group callback.
sample/encode.c example of some encodings.
sample/listcap.c example of the capture history.
sample/posix.c POSIX API sample.
sample/sql.c example of the variable meta characters.

Test Programs

File Description
sample/syntax.c Perl, Java and ASIS syntax test.
sample/crnl.c CRNL test

Source Files

File Description
onigmo.h Onigmo API header file (public)
onigmo-config.in configuration check program template
onigmo.py Onigmo module for Python
regenc.h character encodings framework header file
regint.h internal definitions
regparse.h internal definitions for regparse.c and regcomp.c
regcomp.c compiling and optimization functions
regenc.c character encodings framework
regerror.c error message function
regext.c extended API functions (deluxe version API)
regexec.c search and match functions
regparse.c parsing functions.
regsyntax.c pattern syntax functions and built-in syntax definition
regtrav.c capture history tree data traverse functions
regversion.c version info function
st.h hash table functions header file
st.c hash table functions
onigmognu.h GNU regex API header file (public)
reggnu.c GNU regex API functions
onigmoposix.h POSIX API header file (public)
regposerr.c POSIX error message function
regposix.c POSIX API functions
enc/mktable.c character type table generator
enc/ascii.c ASCII-8BIT encoding
enc/jis/ JIS properties data
enc/euc_jp.c EUC-JP encoding
enc/euc_tw.c EUC-TW encoding
enc/euc_kr.c EUC-KR, EUC-CN encoding
enc/shift_jis.c Shift_JIS encoding
enc/shift_jis.h Common part of Shift_JIS and Windows-31J encoding
enc/windows_31j.c Windows-31J (CP932) encoding
enc/big5.c Big5 encoding
enc/gb18030.c GB18030 encoding
enc/gbk.c GBK encoding
enc/koi8_r.c KOI8-R encoding
enc/koi8_u.c KOI8-U encoding
enc/iso_8859.h common definition of ISO-8859 encoding
enc/iso_8859_1.c ISO-8859-1 (Latin-1)
enc/iso_8859_2.c ISO-8859-2 (Latin-2)
enc/iso_8859_3.c ISO-8859-3 (Latin-3)
enc/iso_8859_4.c ISO-8859-4 (Latin-4)
enc/iso_8859_5.c ISO-8859-5 (Cyrillic)
enc/iso_8859_6.c ISO-8859-6 (Arabic)
enc/iso_8859_7.c ISO-8859-7 (Greek)
enc/iso_8859_8.c ISO-8859-8 (Hebrew)
enc/iso_8859_9.c ISO-8859-9 (Latin-5 or Turkish)
enc/iso_8859_10.c ISO-8859-10 (Latin-6 or Nordic)
enc/iso_8859_11.c ISO-8859-11 (Thai)
enc/iso_8859_13.c ISO-8859-13 (Latin-7 or Baltic Rim)
enc/iso_8859_14.c ISO-8859-14 (Latin-8 or Celtic)
enc/iso_8859_15.c ISO-8859-15 (Latin-9 or West European with Euro)
enc/iso_8859_16.c ISO-8859-16 (Latin-10)
enc/utf_8.c UTF-8 encoding
enc/utf_16be.c UTF-16BE encoding
enc/utf_16le.c UTF-16LE encoding
enc/utf_32be.c UTF-32BE encoding
enc/utf_32le.c UTF-32LE encoding
enc/unicode.c common codes of Unicode encoding
enc/unicode/ Unicode case folding data and properties data
enc/windows_1250.c Windows-1250 (CP1250) encoding (Central/Eastern Europe)
enc/windows_1251.c Windows-1251 (CP1251) encoding (Cyrillic)
enc/windows_1252.c Windows-1252 (CP1252) encoding (Latin)
enc/windows_1253.c Windows-1253 (CP1253) encoding (Greek)
enc/windows_1254.c Windows-1254 (CP1254) encoding (Turkish)
enc/windows_1257.c Windows-1257 (CP1257) encoding (Baltic Rim)
enc/cp949.c CP949 encoding (only used in Ruby)
enc/emacs_mule.c Emacs internal encoding (only used in Ruby)
enc/gb2312.c GB2312 encoding (only used in Ruby)
enc/us_ascii.c US-ASCII encoding (only used in Ruby)
win32/Makefile Makefile for Win32 (VC++)
win32/Makefile.mingw Makefile for Win32 (MinGW)
win32/config.h config.h for Win32
win32/onigmo.rc resource file for Win32
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].