Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / regex / doc / html / boost_regex / background / standards.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>Standards Conformance</title>
5 <link rel="stylesheet" href="../../../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7 <link rel="home" href="../../index.html" title="Boost.Regex 5.1.4">
8 <link rel="up" href="../background.html" title="Background Information">
9 <link rel="prev" href="performance/section_id4148872883.html" title="Testing leftmost-longest searches (platform = linux, compiler = GNU C++ version 6.3.0)">
10 <link rel="next" href="redist.html" title="Redistributables">
11 </head>
12 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
13 <table cellpadding="2" width="100%"><tr>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../../boost.png"></td>
15 <td align="center"><a href="../../../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../../../more/index.htm">More</a></td>
20 </tr></table>
21 <hr>
22 <div class="spirit-nav">
23 <a accesskey="p" href="performance/section_id4148872883.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="redist.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="section">
26 <div class="titlepage"><div><div><h3 class="title">
27 <a name="boost_regex.background.standards"></a><a class="link" href="standards.html" title="Standards Conformance">Standards Conformance</a>
28 </h3></div></div></div>
29 <h5>
30 <a name="boost_regex.background.standards.h0"></a>
31         <span class="phrase"><a name="boost_regex.background.standards.c"></a></span><a class="link" href="standards.html#boost_regex.background.standards.c">C++</a>
32       </h5>
33 <p>
34         Boost.Regex is intended to conform to the <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2005/n1836.pdf" target="_top">Technical
35         Report on C++ Library Extensions</a>.
36       </p>
37 <h5>
38 <a name="boost_regex.background.standards.h1"></a>
39         <span class="phrase"><a name="boost_regex.background.standards.ecmascript_javascript"></a></span><a class="link" href="standards.html#boost_regex.background.standards.ecmascript_javascript">ECMAScript
40         / JavaScript</a>
41       </h5>
42 <p>
43         All of the ECMAScript regular expression syntax features are supported, except
44         that:
45       </p>
46 <p>
47         The escape sequence \u matches any upper case character (the same as [[:upper:]])
48         rather than a Unicode escape sequence; use \x{DDDD} for Unicode escape sequences.
49       </p>
50 <h5>
51 <a name="boost_regex.background.standards.h2"></a>
52         <span class="phrase"><a name="boost_regex.background.standards.perl"></a></span><a class="link" href="standards.html#boost_regex.background.standards.perl">Perl</a>
53       </h5>
54 <p>
55         Almost all Perl features are supported, except for:
56       </p>
57 <p>
58         (?{code}) Not implementable in a compiled strongly typed language.
59       </p>
60 <p>
61         (??{code}) Not implementable in a compiled strongly typed language.
62       </p>
63 <p>
64         (*VERB) The <a href="http://perldoc.perl.org/perlre.html#Special-Backtracking-Control-Verbs" target="_top">backtracking
65         control verbs</a> are not recognised or implemented at this time.
66       </p>
67 <p>
68         In addition the following features behave slightly differently from Perl:
69       </p>
70 <p>
71         ^ $ \Z These recognise any line termination sequence, and not just \n: see
72         the Unicode requirements below.
73       </p>
74 <h5>
75 <a name="boost_regex.background.standards.h3"></a>
76         <span class="phrase"><a name="boost_regex.background.standards.posix"></a></span><a class="link" href="standards.html#boost_regex.background.standards.posix">POSIX</a>
77       </h5>
78 <p>
79         All the POSIX basic and extended regular expression features are supported,
80         except that:
81       </p>
82 <p>
83         No character collating names are recognized except those specified in the
84         POSIX standard for the C locale, unless they are explicitly registered with
85         the traits class.
86       </p>
87 <p>
88         Character equivalence classes ( [[=a=]] etc) are probably buggy except on
89         Win32. Implementing this feature requires knowledge of the format of the
90         string sort keys produced by the system; if you need this, and the default
91         implementation doesn't work on your platform, then you will need to supply
92         a custom traits class.
93       </p>
94 <h5>
95 <a name="boost_regex.background.standards.h4"></a>
96         <span class="phrase"><a name="boost_regex.background.standards.unicode"></a></span><a class="link" href="standards.html#boost_regex.background.standards.unicode">Unicode</a>
97       </h5>
98 <p>
99         The following comments refer to <a href="http://unicode.org/reports/tr18/" target="_top">Unicode
100         Technical Standard #18: Unicode Regular Expressions version 11</a>.
101       </p>
102 <div class="informaltable"><table class="table">
103 <colgroup>
104 <col>
105 <col>
106 <col>
107 </colgroup>
108 <thead><tr>
109 <th>
110                 <p>
111                   Item
112                 </p>
113               </th>
114 <th>
115                 <p>
116                   Feature
117                 </p>
118               </th>
119 <th>
120                 <p>
121                   Support
122                 </p>
123               </th>
124 </tr></thead>
125 <tbody>
126 <tr>
127 <td>
128                 <p>
129                   1.1
130                 </p>
131               </td>
132 <td>
133                 <p>
134                   Hex Notation
135                 </p>
136               </td>
137 <td>
138                 <p>
139                   Yes: use \x{DDDD} to refer to code point UDDDD.
140                 </p>
141               </td>
142 </tr>
143 <tr>
144 <td>
145                 <p>
146                   1.2
147                 </p>
148               </td>
149 <td>
150                 <p>
151                   Character Properties
152                 </p>
153               </td>
154 <td>
155                 <p>
156                   All the names listed under the General Category Property are supported.
157                   Script names and Other Names are not currently supported.
158                 </p>
159               </td>
160 </tr>
161 <tr>
162 <td>
163                 <p>
164                   1.3
165                 </p>
166               </td>
167 <td>
168                 <p>
169                   Subtraction and Intersection
170                 </p>
171               </td>
172 <td>
173                 <p>
174                   Indirectly support by forward-lookahead:
175                 </p>
176                 <p>
177                   <code class="computeroutput"><span class="special">(?=[[:</span><span class="identifier">X</span><span class="special">:]])[[:</span><span class="identifier">Y</span><span class="special">:]]</span></code>
178                 </p>
179                 <p>
180                   Gives the intersection of character properties X and Y.
181                 </p>
182                 <p>
183                   <code class="computeroutput"><span class="special">(?![[:</span><span class="identifier">X</span><span class="special">:]])[[:</span><span class="identifier">Y</span><span class="special">:]]</span></code>
184                 </p>
185                 <p>
186                   Gives everything in Y that is not in X (subtraction).
187                 </p>
188               </td>
189 </tr>
190 <tr>
191 <td>
192                 <p>
193                   1.4
194                 </p>
195               </td>
196 <td>
197                 <p>
198                   Simple Word Boundaries
199                 </p>
200               </td>
201 <td>
202                 <p>
203                   Conforming: non-spacing marks are included in the set of word characters.
204                 </p>
205               </td>
206 </tr>
207 <tr>
208 <td>
209                 <p>
210                   1.5
211                 </p>
212               </td>
213 <td>
214                 <p>
215                   Caseless Matching
216                 </p>
217               </td>
218 <td>
219                 <p>
220                   Supported, note that at this level, case transformations are 1:1,
221                   many to many case folding operations are not supported (for example
222                   "&#223;" to "SS").
223                 </p>
224               </td>
225 </tr>
226 <tr>
227 <td>
228                 <p>
229                   1.6
230                 </p>
231               </td>
232 <td>
233                 <p>
234                   Line Boundaries
235                 </p>
236               </td>
237 <td>
238                 <p>
239                   Supported, except that "." matches only one character
240                   of "\r\n". Other than that word boundaries match correctly;
241                   including not matching in the middle of a "\r\n" sequence.
242                 </p>
243               </td>
244 </tr>
245 <tr>
246 <td>
247                 <p>
248                   1.7
249                 </p>
250               </td>
251 <td>
252                 <p>
253                   Code Points
254                 </p>
255               </td>
256 <td>
257                 <p>
258                   Supported: provided you use the u32* algorithms, then UTF-8, UTF-16
259                   and UTF-32 are all treated as sequences of 32-bit code points.
260                 </p>
261               </td>
262 </tr>
263 <tr>
264 <td>
265                 <p>
266                   2.1
267                 </p>
268               </td>
269 <td>
270                 <p>
271                   Canonical Equivalence
272                 </p>
273               </td>
274 <td>
275                 <p>
276                   Not supported: it is up to the user of the library to convert all
277                   text into the same canonical form as the regular expression.
278                 </p>
279               </td>
280 </tr>
281 <tr>
282 <td>
283                 <p>
284                   2.2
285                 </p>
286               </td>
287 <td>
288                 <p>
289                   Default Grapheme Clusters
290                 </p>
291               </td>
292 <td>
293                 <p>
294                   Not supported.
295                 </p>
296               </td>
297 </tr>
298 <tr>
299 <td>
300                 <p>
301                   2.3Default Word Boundaries
302                 </p>
303               </td>
304 <td>
305                 <p>
306                   Not supported.
307                 </p>
308               </td>
309 <td class="auto-generated">&#160;</td>
310 </tr>
311 <tr>
312 <td>
313                 <p>
314                   2.4
315                 </p>
316               </td>
317 <td>
318                 <p>
319                   Default Loose Matches
320                 </p>
321               </td>
322 <td>
323                 <p>
324                   Not Supported.
325                 </p>
326               </td>
327 </tr>
328 <tr>
329 <td>
330                 <p>
331                   2.5
332                 </p>
333               </td>
334 <td>
335                 <p>
336                   Named Properties
337                 </p>
338               </td>
339 <td>
340                 <p>
341                   Supported: the expression "[[:name:]]" or \N{name} matches
342                   the named character "name".
343                 </p>
344               </td>
345 </tr>
346 <tr>
347 <td>
348                 <p>
349                   2.6
350                 </p>
351               </td>
352 <td>
353                 <p>
354                   Wildcard properties
355                 </p>
356               </td>
357 <td>
358                 <p>
359                   Not Supported.
360                 </p>
361               </td>
362 </tr>
363 <tr>
364 <td>
365                 <p>
366                   3.1
367                 </p>
368               </td>
369 <td>
370                 <p>
371                   Tailored Punctuation.
372                 </p>
373               </td>
374 <td>
375                 <p>
376                   Not Supported.
377                 </p>
378               </td>
379 </tr>
380 <tr>
381 <td>
382                 <p>
383                   3.2
384                 </p>
385               </td>
386 <td>
387                 <p>
388                   Tailored Grapheme Clusters
389                 </p>
390               </td>
391 <td>
392                 <p>
393                   Not Supported.
394                 </p>
395               </td>
396 </tr>
397 <tr>
398 <td>
399                 <p>
400                   3.3
401                 </p>
402               </td>
403 <td>
404                 <p>
405                   Tailored Word Boundaries.
406                 </p>
407               </td>
408 <td>
409                 <p>
410                   Not Supported.
411                 </p>
412               </td>
413 </tr>
414 <tr>
415 <td>
416                 <p>
417                   3.4
418                 </p>
419               </td>
420 <td>
421                 <p>
422                   Tailored Loose Matches
423                 </p>
424               </td>
425 <td>
426                 <p>
427                   Partial support: [[=c=]] matches characters with the same primary
428                   equivalence class as "c".
429                 </p>
430               </td>
431 </tr>
432 <tr>
433 <td>
434                 <p>
435                   3.5
436                 </p>
437               </td>
438 <td>
439                 <p>
440                   Tailored Ranges
441                 </p>
442               </td>
443 <td>
444                 <p>
445                   Supported: [a-b] matches any character that collates in the range
446                   a to b, when the expression is constructed with the collate flag
447                   set.
448                 </p>
449               </td>
450 </tr>
451 <tr>
452 <td>
453                 <p>
454                   3.6
455                 </p>
456               </td>
457 <td>
458                 <p>
459                   Context Matches
460                 </p>
461               </td>
462 <td>
463                 <p>
464                   Not Supported.
465                 </p>
466               </td>
467 </tr>
468 <tr>
469 <td>
470                 <p>
471                   3.7
472                 </p>
473               </td>
474 <td>
475                 <p>
476                   Incremental Matches
477                 </p>
478               </td>
479 <td>
480                 <p>
481                   Supported: pass the flag <code class="computeroutput"><span class="identifier">match_partial</span></code>
482                   to the regex algorithms.
483                 </p>
484               </td>
485 </tr>
486 <tr>
487 <td>
488                 <p>
489                   3.8
490                 </p>
491               </td>
492 <td>
493                 <p>
494                   Unicode Set Sharing
495                 </p>
496               </td>
497 <td>
498                 <p>
499                   Not Supported.
500                 </p>
501               </td>
502 </tr>
503 <tr>
504 <td>
505                 <p>
506                   3.9
507                 </p>
508               </td>
509 <td>
510                 <p>
511                   Possible Match Sets
512                 </p>
513               </td>
514 <td>
515                 <p>
516                   Not supported, however this information is used internally to optimise
517                   the matching of regular expressions, and return quickly if no match
518                   is possible.
519                 </p>
520               </td>
521 </tr>
522 <tr>
523 <td>
524                 <p>
525                   3.10
526                 </p>
527               </td>
528 <td>
529                 <p>
530                   Folded Matching
531                 </p>
532               </td>
533 <td>
534                 <p>
535                   Partial Support: It is possible to achieve a similar effect by
536                   using a custom regular expression traits class.
537                 </p>
538               </td>
539 </tr>
540 <tr>
541 <td>
542                 <p>
543                   3.11
544                 </p>
545               </td>
546 <td>
547                 <p>
548                   Custom Submatch Evaluation
549                 </p>
550               </td>
551 <td>
552                 <p>
553                   Not Supported.
554                 </p>
555               </td>
556 </tr>
557 </tbody>
558 </table></div>
559 </div>
560 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
561 <td align="left"></td>
562 <td align="right"><div class="copyright-footer">Copyright &#169; 1998-2013 John Maddock<p>
563         Distributed under the Boost Software License, Version 1.0. (See accompanying
564         file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
565       </p>
566 </div></td>
567 </tr></table>
568 <hr>
569 <div class="spirit-nav">
570 <a accesskey="p" href="performance/section_id4148872883.html"><img src="../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../background.html"><img src="../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="redist.html"><img src="../../../../../../doc/src/images/next.png" alt="Next"></a>
571 </div>
572 </body>
573 </html>