+[![Build Status](https://travis-ci.org/kkos/oniguruma.svg?branch=master)](https://travis-ci.org/kkos/oniguruma)
+[![Code Quality: Cpp](https://img.shields.io/lgtm/grade/cpp/g/kkos/oniguruma.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/kkos/oniguruma/context:cpp)
+[![Total Alerts](https://img.shields.io/lgtm/alerts/g/kkos/oniguruma.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/kkos/oniguruma/alerts)
+
Oniguruma
=========
https://github.com/kkos/oniguruma
-FIXED Security Issues:
---------------------------
- **CVE-2017-9224, CVE-2017-9225, CVE-2017-9226**
- **CVE-2017-9227, CVE-2017-9228, CVE-2017-9229**
-
Oniguruma is a modern and flexible regular expressions library. It
encompasses features from different regular expression implementations
-that traditionally exist in different languages. It comes close to
-being a complete superset of all regular expression features found
-in other regular expression implementations.
-
-Its features include:
-* Character encoding can be specified per regular expression object.
-* Several regular expression types are supported:
- * Oniguruma (native)
- * POSIX
- * Grep
- * GNU Regex
- * Perl
- * Java
- * Ruby
- * Emacs
+that traditionally exist in different languages.
+
+Character encoding can be specified per regular expression object.
Supported character encodings:
* GB18030: contributed by KUBO Takehiro
* CP1251: contributed by Byte
+* doc/SYNTAX.md: contributed by seanofw
-New feature of version 6.8.0
---------------------------
+Master branch
+-------------
+
+* NEW API: RegSet (set of regexes)
+
+
+Version 6.9.3 (security fix release)
+------------------------------------
+
+* Fixed CVE-2019-13224
+* Fixed CVE-2019-13225
+* Fixed CVE-2019-16163
+* Fixed many problems (found by libFuzzer programs)
+
+
+Version 6.9.2 (Reiwa)
+---------------------
+
+* add doc/SYNTAX.md
+* Direct threaded code (for GCC and Clang)
+* Update Unicode version 12.1.0
+* NEW: Unicode Text Segment mode option (?y{g}) (?y{w}) (*original)
+
+
+Version 6.9.1
+-------------
+
+* Speed improvement (* especially UTF-8)
+
+
+Version 6.9.0
+-------------
+
+* Update Unicode version 11.0.0
+* NEW: add Emoji properties
+
+
+Version 6.8.2
+-------------
+
+* Fix: #80 UChar in header causes issue
+* NEW API: onig_set_callout_user_data_of_match_param() (* omission in 6.8.0)
+* add doc/CALLOUTS.API and doc/CALLOUTS.API.ja
+
+
+Version 6.8.1
+-------------
+
+* Update shared library version to 5.0.0 for API incompatible changes from 6.7.1
+
+
+Version 6.8.0
+-------------
-* NEW API: onig_search_with_param(), onig_match_with_param()
-* NEW: Callouts of contents (?{....}) (?{{....}})
-* NEW: Callouts of name (*name) (*name\[tag](a,b...))
-* NEW: Builtin callout functions (*FAIL) (*SUCCESS) (*ABORT) (*ERROR(n)) (*COUNT)
* Retry-limit-in-match function enabled by default
* NEW: configure option --enable-posix-api=no (* enabled by default)
-
-(* Callout functions are exprimental level and undocumented now)
+* NEW API: onig_search_with_param(), onig_match_with_param()
+* NEW: Callouts of contents (?{...contents...}) (?{...}\[tag]\[X<>]) (?{{...}})
+* NEW: Callouts of name (*name) (*name\[tag]{args...})
+* NEW: Builtin callouts (*FAIL) (*MISMATCH) (*ERROR{n}) (*COUNT) (*MAX{n}) etc..
+* Examples of Callouts program: [callout.c](sample/callout.c), [count.c](sample/count.c), [echo.c](sample/echo.c)
-New feature of version 6.7.1
---------------------------
+Version 6.7.1
+-------------
* NEW: Mechanism of retry-limit-in-match (* disabled by default)
-New feature of version 6.7.0
---------------------------
+Version 6.7.0
+-------------
* NEW: hexadecimal codepoint \uHHHH
* NEW: add ONIG_SYNTAX_ONIGURUMA (== ONIG_SYNTAX_DEFAULT)
* Reduced size of object file
-New feature of version 6.6.0
---------------------------
+Version 6.6.0
+-------------
* NEW: ASCII only mode options for character type/property (?WDSP)
-* NEW: Extended Grapheme Cluster boundary \y, \Y (*original)
+* NEW: Extended Grapheme Cluster boundary \y, \Y
* NEW: Extended Grapheme Cluster \X
* Range-clear (Absent-clear) operator restores previous range in retractions.
-New feature of version 6.5.0
---------------------------
+Version 6.5.0
+-------------
* NEW: \K (keep)
* NEW: \R (general newline) \N (no newline)
* NEW: \O (true anychar)
* NEW: if-then-else (?(...)...\|...)
* NEW: Backreference validity checker (?(xxx)) (*original)
-* NEW: Absent repeater (?~absent) \[is equal to (?\~\|absent|\O*)]
+* NEW: Absent repeater (?~absent) \[is equal to (?\~\|(?:absent)|\O*)]
* NEW: Absent expression (?~|absent|expr) (*original)
* NEW: Absent stopper (?~|absent) (*original)
-New feature of version 6.4.0
---------------------------
+Version 6.4.0
+-------------
* Fix fatal problem of endless repeat on Windows
* NEW: call zero (call the total regexp) \g<0>
* NEW: relative backref/call by positive number \k<+n>, \g<+n>
-New feature of version 6.3.0
---------------------------
+Version 6.3.0
+-------------
* NEW: octal codepoint \o{.....}
+* Fixed CVE-2017-9224
+* Fixed CVE-2017-9225
+* Fixed CVE-2017-9226
+* Fixed CVE-2017-9227
+* Fixed CVE-2017-9228
+* Fixed CVE-2017-9229
-New feature of version 6.1.2
---------------------------
+Version 6.1.2
+-------------
* allow word bound, word begin and word end in look-behind.
* NEW option: ONIG_OPTION_CHECK_VALIDITY_OF_STRING
-New feature of version 6.1
---------------------------
+Version 6.1
+-----------
* improved doc/RE
* NEW API: onig_scan()
-New feature of version 6.0
---------------------------
+Version 6.0
+-----------
* Update Unicode 8.0 Property/Case-folding
* NEW API: onig_unicode_define_user_property()
### Case 2: Windows 64/32bit platform (Visual Studio)
- execute make_win64 or make_win32
+ Execute make_win.bat
onig_s.lib: static link library
onig.dll: dynamic link library
See doc/API for Oniguruma API.
If you want to disable UChar type (== unsigned char) definition
- in oniguruma.h, define ONIG_ESCAPE_UCHAR_COLLISION and then
+ in oniguruma.h, define ONIG_ESCAPE_UCHAR_COLLISION and then
include oniguruma.h.
If you want to disable regex_t type definition in oniguruma.h,
|File |Description |
|:---------------------|:-----------------------------------------|
+|sample/callout.c |example of callouts |
+|sample/count.c |example of built-in callout *COUNT |
+|sample/echo.c |example of user defined callouts of name |
+|sample/encode.c |example of some encodings |
+|sample/listcap.c |example of the capture history |
+|sample/names.c |example of the named group callback |
+|sample/posix.c |POSIX API sample |
+|sample/regset.c |example of using RegSet API |
+|sample/scan.c |example of using onig_scan() |
|sample/simple.c |example of the minimum (Oniguruma 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/scan.c |example of using onig_scan(). |
-|sample/sql.c |example of the variable meta characters. |
-|sample/user_property.c|example of user defined Unicode property. |
-|sample/callout.c |example of callouts. |
+|sample/sql.c |example of the variable meta characters |
+|sample/user_property.c|example of user defined Unicode property |
Test Programs
|utf32_le.c |UTF-32LE encoding |
|unicode.c |common codes of Unicode encoding |
|unicode_fold_data.c|Unicode folding data |
-|win32/Makefile |Makefile for Win32 (VC++) |
-|win32/config.h |config.h for Win32 |
+|windows/testc.c |Test program for Windows (VC++) |