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