]> granicus.if.org Git - onig/blob - README.md
rename Absent-clear to Range-clear
[onig] / README.md
1 Oniguruma
2 =========
3
4 https://github.com/kkos/oniguruma
5
6 FIXED Security Issues:
7 --------------------------
8   **CVE-2017-9224, CVE-2017-9225, CVE-2017-9226**
9   **CVE-2017-9227, CVE-2017-9228, CVE-2017-9229**
10
11
12 Oniguruma is a regular expressions library.
13 The characteristics of this library is that different character encoding
14 for every regular expression object can be specified.
15
16 Supported character encodings:
17
18   ASCII, UTF-8, UTF-16BE, UTF-16LE, UTF-32BE, UTF-32LE,
19   EUC-JP, EUC-TW, EUC-KR, EUC-CN,
20   Shift_JIS, Big5, GB18030, KOI8-R, CP1251,
21   ISO-8859-1, ISO-8859-2, ISO-8859-3, ISO-8859-4, ISO-8859-5,
22   ISO-8859-6, ISO-8859-7, ISO-8859-8, ISO-8859-9, ISO-8859-10,
23   ISO-8859-11, ISO-8859-13, ISO-8859-14, ISO-8859-15, ISO-8859-16
24
25 * GB18030: contributed by KUBO Takehiro
26 * CP1251:  contributed by Byte
27
28
29 New feature of version 6.6.0
30 --------------------------
31
32 * NEW: ASCII only mode options for character type/property (?WDSP)
33 * NEW: Extended Grapheme Cluster boundary \y, \Y (*original)
34 * NEW: Extended Grapheme Cluster \X
35 * Range-clear (renamed from Absent-clear) operator restores previous range in backtrack.
36
37
38 New feature of version 6.5.0
39 --------------------------
40
41 * NEW: \K (keep)
42 * NEW: \R (general newline) \N (no newline)
43 * NEW: \O (true anychar)
44 * NEW: if-then-else syntax   (?(...)...\|...)
45 * NEW: Backreference validity checker (?(xxx)) (*original)
46 * NEW: Absent repeater (?~absent)
47 * NEW: Absent expression   (?~|absent|expr)  (*original)
48 * NEW: Absent stopper (?~|absent)     (*original)
49
50
51 New feature of version 6.4.0
52 --------------------------
53
54 * Fix fatal problem of endless repeat on Windows
55 * NEW: call zero (call the total regexp)
56 * NEW: relative backref and relative call by positive number
57
58
59 New feature of version 6.3.0
60 --------------------------
61
62 * NEW SYNTAX: escape-o-brace for octal codepoint.
63
64
65 New feature of version 6.1.2
66 --------------------------
67
68 * allow word bound, word begin and word end in look-behind.
69 * NEW option: ONIG_OPTION_CHECK_VALIDITY_OF_STRING
70
71 New feature of version 6.1
72 --------------------------
73
74 * improved doc/RE
75 * NEW API: onig_scan()
76
77 New feature of version 6.0
78 --------------------------
79
80 * Update Unicode 8.0 Property/Case-folding
81 * NEW API: onig_unicode_define_user_property()
82
83
84 License
85 -------
86
87   BSD license.
88
89
90 Install
91 -------
92
93 ### Case 1: Unix and Cygwin platform
94
95    1. autoreconf -vfi   (* case: configure script is not found.)
96
97    2. ./configure
98    3. make
99    4. make install
100
101    * uninstall
102
103      make uninstall
104
105    * configuration check
106
107      onig-config --cflags
108      onig-config --libs
109      onig-config --prefix
110      onig-config --exec-prefix
111
112
113
114 ### Case 2: Windows 64/32bit platform (Visual Studio)
115
116    execute make_win64 or make_win32
117
118       onig_s.lib:  static link library
119       onig.dll:    dynamic link library
120
121    * test (ASCII/Shift_JIS)
122
123       1. cd src
124       2. copy ..\windows\testc.c .
125       3. nmake -f Makefile.windows ctest
126
127    (I have checked by Visual Studio Community 2015)
128
129
130
131 Regular Expressions
132 -------------------
133
134   See [doc/RE](doc/RE) or [doc/RE.ja](doc/RE.ja) for Japanese.
135
136
137 Usage
138 -----
139
140   Include oniguruma.h in your program. (Oniguruma API)
141   See doc/API for Oniguruma API.
142
143   If you want to disable UChar type (== unsigned char) definition
144   in oniguruma.h, define ONIG_ESCAPE_UCHAR_COLLISION and then 
145   include oniguruma.h.
146
147   If you want to disable regex_t type definition in oniguruma.h,
148   define ONIG_ESCAPE_REGEX_T_COLLISION and then include oniguruma.h.
149
150   Example of the compiling/linking command line in Unix or Cygwin,
151   (prefix == /usr/local case)
152
153     cc sample.c -L/usr/local/lib -lonig
154
155
156   If you want to use static link library(onig_s.lib) in Win32,
157   add option -DONIG_EXTERN=extern to C compiler.
158
159
160
161 Sample Programs
162 ---------------
163
164 |File                  |Description                               |
165 |:---------------------|:-----------------------------------------|
166 |sample/simple.c       |example of the minimum (Oniguruma API)    |
167 |sample/names.c        |example of the named group callback.      |
168 |sample/encode.c       |example of some encodings.                |
169 |sample/listcap.c      |example of the capture history.           |
170 |sample/posix.c        |POSIX API sample.                         |
171 |sample/scan.c         |example of using onig_scan().             |
172 |sample/sql.c          |example of the variable meta characters.  |
173 |sample/user_property.c|example of user defined Unicode property. |
174
175
176 Test Programs
177
178 |File               |Description                            |
179 |:------------------|:--------------------------------------|
180 |sample/syntax.c    |Perl, Java and ASIS syntax test.       |
181 |sample/crnl.c      |--enable-crnl-as-line-terminator test  |
182
183
184
185 Source Files
186 ------------
187
188 |File               |Description                                             |
189 |:------------------|:-------------------------------------------------------|
190 |oniguruma.h        |Oniguruma API header file (public)                      |
191 |onig-config.in     |configuration check program template                    |
192 |regenc.h           |character encodings framework header file               |
193 |regint.h           |internal definitions                                    |
194 |regparse.h         |internal definitions for regparse.c and regcomp.c       |
195 |regcomp.c          |compiling and optimization functions                    |
196 |regenc.c           |character encodings framework                           |
197 |regerror.c         |error message function                                  |
198 |regext.c           |extended API functions (deluxe version API)             |
199 |regexec.c          |search and match functions                              |
200 |regparse.c         |parsing functions.                                      |
201 |regsyntax.c        |pattern syntax functions and built-in syntax definitions|
202 |regtrav.c          |capture history tree data traverse functions            |
203 |regversion.c       |version info function                                   |
204 |st.h               |hash table functions header file                        |
205 |st.c               |hash table functions                                    |
206 |oniggnu.h          |GNU regex API header file (public)                      |
207 |reggnu.c           |GNU regex API functions                                 |
208 |onigposix.h        |POSIX API header file (public)                          |
209 |regposerr.c        |POSIX error message function                            |
210 |regposix.c         |POSIX API functions                                     |
211 |mktable.c          |character type table generator                          |
212 |ascii.c            |ASCII encoding                                          |
213 |euc_jp.c           |EUC-JP encoding                                         |
214 |euc_tw.c           |EUC-TW encoding                                         |
215 |euc_kr.c           |EUC-KR, EUC-CN encoding                                 |
216 |sjis.c             |Shift_JIS encoding                                      |
217 |big5.c             |Big5      encoding                                      |
218 |gb18030.c          |GB18030   encoding                                      |
219 |koi8.c             |KOI8      encoding                                      |
220 |koi8_r.c           |KOI8-R    encoding                                      |
221 |cp1251.c           |CP1251    encoding                                      |
222 |iso8859_1.c        |ISO-8859-1 (Latin-1)                                    |
223 |iso8859_2.c        |ISO-8859-2 (Latin-2)                                    |
224 |iso8859_3.c        |ISO-8859-3 (Latin-3)                                    |
225 |iso8859_4.c        |ISO-8859-4 (Latin-4)                                    |
226 |iso8859_5.c        |ISO-8859-5 (Cyrillic)                                   |
227 |iso8859_6.c        |ISO-8859-6 (Arabic)                                     |
228 |iso8859_7.c        |ISO-8859-7 (Greek)                                      |
229 |iso8859_8.c        |ISO-8859-8 (Hebrew)                                     |
230 |iso8859_9.c        |ISO-8859-9 (Latin-5 or Turkish)                         |
231 |iso8859_10.c       |ISO-8859-10 (Latin-6 or Nordic)                         |
232 |iso8859_11.c       |ISO-8859-11 (Thai)                                      |
233 |iso8859_13.c       |ISO-8859-13 (Latin-7 or Baltic Rim)                     |
234 |iso8859_14.c       |ISO-8859-14 (Latin-8 or Celtic)                         |
235 |iso8859_15.c       |ISO-8859-15 (Latin-9 or West European with Euro)        |
236 |iso8859_16.c       |ISO-8859-16 (Latin-10)                                  |
237 |utf8.c             |UTF-8    encoding                                       |
238 |utf16_be.c         |UTF-16BE encoding                                       |
239 |utf16_le.c         |UTF-16LE encoding                                       |
240 |utf32_be.c         |UTF-32BE encoding                                       |
241 |utf32_le.c         |UTF-32LE encoding                                       |
242 |unicode.c          |common codes of Unicode encoding                        |
243 |unicode_fold_data.c|Unicode folding data                                    |
244 |win32/Makefile     |Makefile for Win32 (VC++)                               |
245 |win32/config.h     |config.h for Win32                                      |