[12] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
---|
| 2 | <html> |
---|
| 3 | <head> |
---|
| 4 | <title>Boost.Regex: Standards Conformance</title> |
---|
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
---|
| 6 | <link rel="stylesheet" type="text/css" href="../../../boost.css"> |
---|
| 7 | </head> |
---|
| 8 | <body> |
---|
| 9 | <P> |
---|
| 10 | <TABLE id="Table1" cellSpacing="1" cellPadding="1" width="100%" border="0"> |
---|
| 11 | <TR> |
---|
| 12 | <td valign="top" width="300"> |
---|
| 13 | <h3><a href="../../../index.htm"><img height="86" width="277" alt="C++ Boost" src="../../../boost.png" border="0"></a></h3> |
---|
| 14 | </td> |
---|
| 15 | <TD width="353"> |
---|
| 16 | <H1 align="center">Boost.Regex</H1> |
---|
| 17 | <H2 align="center">Standards Conformance</H2> |
---|
| 18 | </TD> |
---|
| 19 | <td width="50"> |
---|
| 20 | <h3><a href="index.html"><img height="45" width="43" alt="Boost.Regex Index" src="uarrow.gif" border="0"></a></h3> |
---|
| 21 | </td> |
---|
| 22 | </TR> |
---|
| 23 | </TABLE> |
---|
| 24 | </P> |
---|
| 25 | <HR> |
---|
| 26 | <H3>C++</H3> |
---|
| 27 | <P>Boost.regex is intended to conform to the <A href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1429.htm"> |
---|
| 28 | regular expression standardization proposal</A>, which will appear in a |
---|
| 29 | future C++ standard technical report (and hopefully in a future version of the |
---|
| 30 | standard). </P> |
---|
| 31 | <H3>ECMAScript / JavaScript</H3> |
---|
| 32 | <P>All of the ECMAScript regular expression syntax features are supported, except |
---|
| 33 | that:</P> |
---|
| 34 | <P>Negated class escapes (\S, \D and \W) are not permitted inside character class |
---|
| 35 | definitions ( [...] ).</P> |
---|
| 36 | <P>The escape sequence \u matches any upper case character (the same as |
---|
| 37 | [[:upper:]]) rather than a Unicode escape sequence; use \x{DDDD} for |
---|
| 38 | Unicode escape sequences.</P> |
---|
| 39 | <H3>Perl</H3> |
---|
| 40 | <P>Almost all Perl features are supported, except for:</P> |
---|
| 41 | <P> |
---|
| 42 | <TABLE id="Table2" cellSpacing="1" cellPadding="1" width="100%" border="0"> |
---|
| 43 | <TR> |
---|
| 44 | <TD>(?{code})</TD> |
---|
| 45 | <TD>Not implementable in a compiled strongly typed language.</TD> |
---|
| 46 | </TR> |
---|
| 47 | <TR> |
---|
| 48 | <TD>(??{code})</TD> |
---|
| 49 | <TD>Not implementable in a compiled strongly typed language.</TD> |
---|
| 50 | </TR> |
---|
| 51 | </TABLE> |
---|
| 52 | </P> |
---|
| 53 | <H3>POSIX</H3> |
---|
| 54 | <P>All the POSIX basic and extended regular expression features are supported, |
---|
| 55 | except that:</P> |
---|
| 56 | <P>No character collating names are recognized except those specified in the POSIX |
---|
| 57 | standard for the C locale, unless they are explicitly registered with the |
---|
| 58 | traits class.</P> |
---|
| 59 | <P>Character equivalence classes ( [[=a=]] etc) are probably buggy except on |
---|
| 60 | Win32. Implementing this feature requires knowledge of the format of the |
---|
| 61 | string sort keys produced by the system; if you need this, and the default |
---|
| 62 | implementation doesn't work on your platform, then you will need to supply a |
---|
| 63 | custom traits class.</P> |
---|
| 64 | <H3>Unicode</H3> |
---|
| 65 | <P>The following comments refer to <A href="http://www.unicode.org/reports/tr18/">Unicode |
---|
| 66 | Technical |
---|
| 67 | <SPAN>Standard |
---|
| 68 | </SPAN>#18: Unicode Regular Expressions</A> version 9.</P> |
---|
| 69 | <P> |
---|
| 70 | <TABLE id="Table3" cellSpacing="1" cellPadding="1" width="100%" border="0"> |
---|
| 71 | <TR> |
---|
| 72 | <TD>#</TD> |
---|
| 73 | <TD>Feature</TD> |
---|
| 74 | <TD>Support</TD> |
---|
| 75 | </TR> |
---|
| 76 | <TR> |
---|
| 77 | <TD>1.1</TD> |
---|
| 78 | <TD>Hex Notation</TD> |
---|
| 79 | <TD>Yes: use \x{DDDD} to refer to code point UDDDD.</TD> |
---|
| 80 | </TR> |
---|
| 81 | <TR> |
---|
| 82 | <TD>1.2</TD> |
---|
| 83 | <TD>Character Properties</TD> |
---|
| 84 | <TD>All the names listed under the <A href="http://www.unicode.org/reports/tr18/#Categories">General |
---|
| 85 | Category Property</A> are supported. Script names and Other Names are |
---|
| 86 | not currently supported.</TD> |
---|
| 87 | </TR> |
---|
| 88 | <TR> |
---|
| 89 | <TD>1.3</TD> |
---|
| 90 | <TD><A name="Subtraction_and_Intersection">Subtraction</A> and Intersection</TD> |
---|
| 91 | <TD> |
---|
| 92 | <P>Indirectly support by forward-lookahead: |
---|
| 93 | </P> |
---|
| 94 | <P>(?=[[:X:]])[[:Y:]]</P> |
---|
| 95 | <P>Gives the intersection of character properties X and Y.</P> |
---|
| 96 | <P>(?![[:X:]])[[:Y:]]</P> |
---|
| 97 | <P>Gives everything in Y that is not in X (subtraction).</P> |
---|
| 98 | </TD> |
---|
| 99 | </TR> |
---|
| 100 | <TR> |
---|
| 101 | <TD>1.4</TD> |
---|
| 102 | <TD><A name="Simple_Word_Boundaries">Simple Word Boundaries</A></TD> |
---|
| 103 | <TD>Conforming: non-spacing marks are included in the set of word characters.</TD> |
---|
| 104 | </TR> |
---|
| 105 | <TR> |
---|
| 106 | <TD>1.5</TD> |
---|
| 107 | <TD>Caseless Matching</TD> |
---|
| 108 | <TD>Supported, note that at this level, case transformations are 1:1, many to many |
---|
| 109 | case folding operations are not supported (for example "ß" to "SS").</TD> |
---|
| 110 | </TR> |
---|
| 111 | <TR> |
---|
| 112 | <TD>1.6</TD> |
---|
| 113 | <TD>Line Boundaries</TD> |
---|
| 114 | <TD>Supported, except that "." matches only one character of "\r\n". Other than |
---|
| 115 | that word boundaries match correctly; including not matching in the middle of a |
---|
| 116 | "\r\n" sequence.</TD> |
---|
| 117 | </TR> |
---|
| 118 | <TR> |
---|
| 119 | <TD>1.7</TD> |
---|
| 120 | <TD>Code Points</TD> |
---|
| 121 | <TD>Supported: provided you use the <A href="icu_strings.html">u32* algorithms</A>, |
---|
| 122 | then UTF-8, UTF-16 and UTF-32 are all treated as sequences of 32-bit code |
---|
| 123 | points.</TD> |
---|
| 124 | </TR> |
---|
| 125 | <TR> |
---|
| 126 | <TD>2.1</TD> |
---|
| 127 | <TD>Canonical Equivalence</TD> |
---|
| 128 | <TD>Not supported: it is up to the user of the library to convert all text into |
---|
| 129 | the same canonical form as the regular expression.</TD> |
---|
| 130 | </TR> |
---|
| 131 | <TR> |
---|
| 132 | <TD>2.2</TD> |
---|
| 133 | <TD>Default Grapheme Clusters</TD> |
---|
| 134 | <TD>Not supported.</TD> |
---|
| 135 | </TR> |
---|
| 136 | <TR> |
---|
| 137 | <TD>2.3</TD> |
---|
| 138 | <TD><!--StartFragment --> |
---|
| 139 | <P><A name="Default_Word_Boundaries">Default Word Boundaries</A></P> |
---|
| 140 | </TD> |
---|
| 141 | <TD>Not supported.</TD> |
---|
| 142 | </TR> |
---|
| 143 | <TR> |
---|
| 144 | <TD>2.4</TD> |
---|
| 145 | <TD><!--StartFragment --> |
---|
| 146 | <P><A name="Default_Loose_Matches">Default Loose Matches</A></P> |
---|
| 147 | </TD> |
---|
| 148 | <TD>Not Supported.</TD> |
---|
| 149 | </TR> |
---|
| 150 | <TR> |
---|
| 151 | <TD>2.5</TD> |
---|
| 152 | <TD>Name Properties</TD> |
---|
| 153 | <TD>Supported: the expression "[[:name:]]" or \N{name} matches the named character |
---|
| 154 | "name".</TD> |
---|
| 155 | </TR> |
---|
| 156 | <TR> |
---|
| 157 | <TD>2.6</TD> |
---|
| 158 | <TD>Wildcard properties</TD> |
---|
| 159 | <TD>Not Supported.</TD> |
---|
| 160 | </TR> |
---|
| 161 | <TR> |
---|
| 162 | <TD>3.1</TD> |
---|
| 163 | <TD>Tailored Punctuation.</TD> |
---|
| 164 | <TD>Not Supported.</TD> |
---|
| 165 | </TR> |
---|
| 166 | <TR> |
---|
| 167 | <TD>3.2</TD> |
---|
| 168 | <TD>Tailored Grapheme Clusters</TD> |
---|
| 169 | <TD>Not Supported.</TD> |
---|
| 170 | </TR> |
---|
| 171 | <TR> |
---|
| 172 | <TD>3.3</TD> |
---|
| 173 | <TD>Tailored Word Boundaries.</TD> |
---|
| 174 | <TD>Not Supported.</TD> |
---|
| 175 | </TR> |
---|
| 176 | <TR> |
---|
| 177 | <TD>3.4</TD> |
---|
| 178 | <TD>Tailored Loose Matches</TD> |
---|
| 179 | <TD>Partial support: [[=c=]] matches characters with the same primary equivalence |
---|
| 180 | class as "c".</TD> |
---|
| 181 | </TR> |
---|
| 182 | <TR> |
---|
| 183 | <TD>3.5</TD> |
---|
| 184 | <TD>Tailored Ranges</TD> |
---|
| 185 | <TD>Supported: [a-b] matches any character that collates in the range a to b, when |
---|
| 186 | the expression is constructed with the <A href="syntax_option_type.html">collate</A> |
---|
| 187 | flag set.</TD> |
---|
| 188 | </TR> |
---|
| 189 | <TR> |
---|
| 190 | <TD>3.6</TD> |
---|
| 191 | <TD>Context Matches</TD> |
---|
| 192 | <TD>Not Supported.</TD> |
---|
| 193 | </TR> |
---|
| 194 | <TR> |
---|
| 195 | <TD>3.7</TD> |
---|
| 196 | <TD>Incremental Matches</TD> |
---|
| 197 | <TD>Supported: pass the flag <A href="match_flag_type.html">match_partial</A> to |
---|
| 198 | the regex algorithms.</TD> |
---|
| 199 | </TR> |
---|
| 200 | <TR> |
---|
| 201 | <TD>3.8</TD> |
---|
| 202 | <TD>Unicode Set Sharing</TD> |
---|
| 203 | <TD>Not Supported.</TD> |
---|
| 204 | </TR> |
---|
| 205 | <TR> |
---|
| 206 | <TD>3.9</TD> |
---|
| 207 | <TD>Possible Match Sets</TD> |
---|
| 208 | <TD>Not supported, however this information is used internally to optimise the |
---|
| 209 | matching of regular expressions, and return quickly if no match is possible.</TD> |
---|
| 210 | </TR> |
---|
| 211 | <TR> |
---|
| 212 | <TD>3.10</TD> |
---|
| 213 | <TD>Folded Matching</TD> |
---|
| 214 | <TD>Partial Support: It is possible to achieve a similar effect by using a |
---|
| 215 | custom regular expression traits class.</TD> |
---|
| 216 | </TR> |
---|
| 217 | <TR> |
---|
| 218 | <TD>3.11</TD> |
---|
| 219 | <TD>Custom Submatch Evaluation</TD> |
---|
| 220 | <TD>Not Supported.</TD> |
---|
| 221 | </TR> |
---|
| 222 | </TABLE> |
---|
| 223 | </P> |
---|
| 224 | <HR> |
---|
| 225 | <p>Revised |
---|
| 226 | <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%d %B, %Y" startspan --> |
---|
| 227 | 28 June 2004 |
---|
| 228 | <!--webbot bot="Timestamp" endspan i-checksum="39359" --></p> |
---|
| 229 | <p><i>© Copyright John Maddock 1998- |
---|
| 230 | <!--webbot bot="Timestamp" S-Type="EDITED" S-Format="%Y" startspan --> 2004<!--webbot bot="Timestamp" endspan i-checksum="39359" --></i></p> |
---|
| 231 | <P><I>Use, modification and distribution are subject to the Boost Software License, |
---|
| 232 | Version 1.0. (See accompanying file <A href="../../../LICENSE_1_0.txt">LICENSE_1_0.txt</A> |
---|
| 233 | or copy at <A href="http://www.boost.org/LICENSE_1_0.txt">http://www.boost.org/LICENSE_1_0.txt</A>)</I></P> |
---|
| 234 | </body> |
---|
| 235 | </html> |
---|
| 236 | |
---|
| 237 | |
---|