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