Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Onigmo is a regular expressions library forked from Oniguruma.
C C++ Shell Python Ruby

Merge tag 'Oniguruma-5.9.6'

The original version of Oniguruma 5.9.6

Conflicts:
	configure
	configure.in
	enc/unicode.c
	oniguruma.h
	regcomp.c
	regint.h
latest commit d0b3173893
K.Takata authored
Failed to load latest commit information.
doc [doc] onig_init(): Add notes for multithreading
enc Merge tag 'Oniguruma-5.9.6'
m4 import Oniguruma 5.9.5
sample sample/crnl.c: fix wrong condition
tool Merge Ruby r46039, r46051 and r46052
win32 Remove obsolete variables from win32/Makefile*
.editorconfig [dist] remove a workaround for EditorConfig on Win32
.gitignore Enable Travis CI (Issue #36)
.travis.yml Add a new make target pytest
AUTHORS change documents and copyrights
COPYING update documents and version number (5.14.0)
HISTORY Merge tag 'Oniguruma-5.9.6'
INSTALL update INSTALL by using automake 1.10.3
Makefile.am Add -no-undefine link flag
Makefile.in Add -no-undefine link flag
README README: Add link to the wiki page
README.ja README: Add link to the wiki page
aclocal.m4 Merge tag 'Oniguruma-5.9.5' (Issue #30)
compile [dist] regenerate autotools files
config.guess [dist] regenerate autotools files
config.h.in [dist] update configure and config.h.in
config.sub [dist] regenerate autotools files
configure Update documents and version number (5.15.0)
configure.in Update documents and version number (5.15.0)
depcomp [dist] regenerate autotools files
index.html Import Oniguruma 5.9.6
index_ja.html Import Oniguruma 5.9.6
install-sh update all autotools-related files
ltmain.sh import Oniguruma 5.9.5
missing [dist] regenerate autotools files
onig-config.in trim trailing whitespace
onig.py onig.py: Remove ONIG_SYN_POSIX_BRACKET_ALWAYS_ALL_RANGE
oniggnu.h fork from Oniguruma 5.9.2
onigposix.h fix English
oniguruma.h Update documents and version number (5.15.0)
oniguruma.pc.in import Oniguruma 5.9.4
regcomp.c Merge tag 'Oniguruma-5.9.6'
regenc.c [bug] Fix possible memory leaks
regenc.h Use numberof macro
regerror.c sort error messages by its code
regexec.c [impl] Update debug log
regext.c update version number (5.11.0)
reggnu.c update version number (5.11.0)
regint.h Merge tag 'Oniguruma-5.9.6'
regparse.c Merge Ruby r47601
regparse.h Adjust struct alignment
regposerr.c Define a macro "numberof"
regposix.c Define a macro "numberof"
regsyntax.c update copyright information.
regtrav.c update version number (5.11.0)
regversion.c update documents and version number (5.14.0)
st.c fork from Oniguruma 5.9.2
st.h Merge Ruby r24792 partly
test.rb trim trailing whitespace
testc.c update tests
testconv.rb update tests
testconvu.rb update tests
testpy.py testpy.py: Add a test for Issue #44
testu.c update tests

README

README  2014/07/18

Onigmo (Oniguruma-mod)  --  (C) K.Takata <kentkt AT csc DOT jp>

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

Onigmo is a regular expressions library forked from Oniguruma.
Some of new features introduced in Perl 5.10+ can be used.

Some patches are merged from Ruby 2.x.

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


Main New features:
  Regular Expressions (depends on the syntax):
    \K, \R, \X, (?(cond)yes|no)
    (?adlu), \g{name}, \g{n}, (?&name), (?n), (?R), (?0)
    (?P<name>...), (?P=name), (?P>name)

  API:
    onig_search_gpos (for Perl-compatible \G)

  Encoding:
    CP932

  Syntax:
    Python


New Source Files:
  enc/cp932.c                   CP932 encoding.
  enc/jis/props.h               JIS character properties data.
  enc/jis/props.kwd             JIS character properties data.
  enc/unicode/casefold.h        Unicode case folding data.
  enc/unicode/name2ctype.h      Unicode properties data.

  onig.py                       onig.dll/libonig.so loader.
  testpy.py                     test program.

  tool/download-ucd.sh          downloads Unicode Character Database (UCD).
  tool/case-folding.rb          generates casefold.h from UCD.
  tool/convert-jis-props.sh     converts props.kwd to props.h.
  tool/convert-name2ctype.sh    converts name2ctype.kwd to name2ctypes.h.
  tool/enc-unicode.rb           generates name2ctype.kwd from UCD.

  win32/Makefile.mingw          Makefile for Win32 (MinGW)
  win32/makedef.py              creates onig.def.
  win32/onig.rc                 resource file for onig.dll.


ToDo:
  * Reduce the size of Unicode Character Data.
  * (?|...)
  * Improve (?(cond)yes|no). (support look-ahead/behind assertions.)


Oniguruma's README follows:
======================================================================
README  2007/05/31

Oniguruma  ----   (C) K.Kosako <sndgk393 AT ybb DOT ne DOT jp>

http://www.geocities.jp/kosako3/oniguruma/

Oniguruma is a regular expressions library.
The characteristics of this library is that different character encoding
for every regular expression object can be specified.

Supported character encodings:

  ASCII, UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE,
  EUC-JP, EUC-TW, EUC-KR, EUC-CN,
  Shift_JIS, Big5, GB18030, KOI8-R, CP1251,
  ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5,
  ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-10,
  ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16

* GB18030: contributed by KUBO Takehiro
* CP1251:  contributed by Byte
------------------------------------------------------------

License

   BSD license.


Install

 Case 1: Unix and Cygwin platform

   1. ./configure
   2. make
   3. make install

   * uninstall

     make uninstall

   * test (ASCII/EUC-JP)

     make atest

   * configuration check

     onig-config --cflags
     onig-config --libs
     onig-config --prefix
     onig-config --exec-prefix



 Case 2: Win32 platform (VC++)

   1. copy win32\Makefile Makefile
   2. copy win32\config.h config.h
   3. nmake

      onig_s.lib:  static link library
      onig.dll:    dynamic link library

  * test (ASCII/Shift_JIS)
   4. copy win32\testc.c testc.c
   5. nmake ctest



Regular Expressions

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


Usage

  Include oniguruma.h in your program. (Oniguruma API)
  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
  include oniguruma.h.

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

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

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


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



Sample Programs

  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/sql.c       example of the variable meta characters.
                     (SQL-like pattern matching)

Test Programs
  sample/syntax.c    Perl, Java and ASIS syntax test.
  sample/crnl.c      --enable-crnl-as-line-terminator test


Source Files

  oniguruma.h        Oniguruma API header file. (public)
  onig-config.in     configuration check program template.

  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 definitions.
  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

  oniggnu.h          GNU regex API header file. (public)
  reggnu.c           GNU regex API functions

  onigposix.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 encoding.
  enc/euc_jp.c       EUC-JP encoding.
  enc/euc_tw.c       EUC-TW encoding.
  enc/euc_kr.c       EUC-KR, EUC-CN encoding.
  enc/sjis.c         Shift_JIS encoding.
  enc/big5.c         Big5      encoding.
  enc/gb18030.c      GB18030   encoding.
  enc/koi8.c         KOI8      encoding.
  enc/koi8_r.c       KOI8-R    encoding.
  enc/cp1251.c       CP1251    encoding.
  enc/iso8859_1.c    ISO-8859-1  encoding. (Latin-1)
  enc/iso8859_2.c    ISO-8859-2  encoding. (Latin-2)
  enc/iso8859_3.c    ISO-8859-3  encoding. (Latin-3)
  enc/iso8859_4.c    ISO-8859-4  encoding. (Latin-4)
  enc/iso8859_5.c    ISO-8859-5  encoding. (Cyrillic)
  enc/iso8859_6.c    ISO-8859-6  encoding. (Arabic)
  enc/iso8859_7.c    ISO-8859-7  encoding. (Greek)
  enc/iso8859_8.c    ISO-8859-8  encoding. (Hebrew)
  enc/iso8859_9.c    ISO-8859-9  encoding. (Latin-5 or Turkish)
  enc/iso8859_10.c   ISO-8859-10 encoding. (Latin-6 or Nordic)
  enc/iso8859_11.c   ISO-8859-11 encoding. (Thai)
  enc/iso8859_13.c   ISO-8859-13 encoding. (Latin-7 or Baltic Rim)
  enc/iso8859_14.c   ISO-8859-14 encoding. (Latin-8 or Celtic)
  enc/iso8859_15.c   ISO-8859-15 encoding. (Latin-9 or West European with Euro)
  enc/iso8859_16.c   ISO-8859-16 encoding.
                     (Latin-10 or South-Eastern European with Euro)
  enc/utf8.c         UTF-8    encoding.
  enc/utf16_be.c     UTF-16BE encoding.
  enc/utf16_le.c     UTF-16LE encoding.
  enc/utf32_be.c     UTF-32BE encoding.
  enc/utf32_le.c     UTF-32LE encoding.
  enc/unicode.c      Unicode information data.

  win32/Makefile     Makefile for Win32 (VC++)
  win32/config.h     config.h for Win32



ToDo

  ? case fold flag: Katakana <-> Hiragana.
  ? add ONIG_OPTION_NOTBOS/NOTEOS. (\A, \z, \Z)
 ?? \X (== \PM\pM*)
 ?? implement syntax behavior ONIG_SYN_CONTEXT_INDEP_ANCHORS.
 ?? transmission stopper. (return ONIG_STOP from match_at())

and I'm thankful to Akinori MUSHA.


Mail Address: K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
Something went wrong with that request. Please try again.