standards.qbk 4.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. [/
  2. Copyright 2006-2007 John Maddock.
  3. Distributed under the Boost Software License, Version 1.0.
  4. (See accompanying file LICENSE_1_0.txt or copy at
  5. http://www.boost.org/LICENSE_1_0.txt).
  6. ]
  7. [section:standards Standards Conformance]
  8. [h4 C++]
  9. Boost.Regex is intended to conform to the [tr1].
  10. [h4 ECMAScript / JavaScript]
  11. All of the ECMAScript regular expression syntax features are supported, except that:
  12. The escape sequence \\u matches any upper case character (the same as \[\[:upper:\]\])
  13. rather than a Unicode escape sequence; use \\x{DDDD} for Unicode escape sequences.
  14. [h4 Perl]
  15. Almost all Perl features are supported, except for:
  16. (?{code}) Not implementable in a compiled strongly typed language.
  17. (??{code}) Not implementable in a compiled strongly typed language.
  18. (*VERB) The [@http://perldoc.perl.org/perlre.html#Special-Backtracking-Control-Verbs
  19. backtracking control verbs] are not recognised or implemented at this time.
  20. In addition the following features behave slightly differently from Perl:
  21. ^ $ \Z These recognise any line termination sequence, and not just \\n: see the Unicode requirements below.
  22. [h4 POSIX]
  23. All the POSIX basic and extended regular expression features are supported,
  24. except that:
  25. No character collating names are recognized except those specified in the
  26. POSIX standard for the C locale, unless they are explicitly registered with the
  27. traits class.
  28. Character equivalence classes ( \[\[\=a\=\]\] etc) are probably buggy except on Win32.
  29. Implementing this feature requires knowledge of the format of the string sort
  30. keys produced by the system; if you need this, and the default implementation
  31. doesn't work on your platform, then you will need to supply a custom traits class.
  32. [h4 Unicode]
  33. The following comments refer to
  34. [@http://unicode.org/reports/tr18/ Unicode Technical Standard #18: Unicode
  35. Regular Expressions version 11].
  36. [table
  37. [[Item][Feature][Support]]
  38. [[1.1][Hex Notation][Yes: use \x{DDDD} to refer to code point UDDDD.]]
  39. [[1.2][Character Properties][All the names listed under the General Category Property are supported. Script names and Other Names are not currently supported.]]
  40. [[1.3][Subtraction and Intersection][Indirectly support by forward-lookahead:
  41. `(?=[[:X:]])[[:Y:]]`
  42. Gives the intersection of character properties X and Y.
  43. `(?![[:X:]])[[:Y:]]`
  44. Gives everything in Y that is not in X (subtraction).]]
  45. [[1.4][Simple Word Boundaries][Conforming: non-spacing marks are included in the set of word characters.]]
  46. [[1.5][Caseless Matching][Supported, note that at this level, case transformations are 1:1, many to many case folding operations are not supported (for example "'''ß'''" to "SS").]]
  47. [[1.6][Line Boundaries][Supported, except that "." matches only one character of "\\r\\n". Other than that word boundaries match correctly; including not matching in the middle of a "\\r\\n" sequence.]]
  48. [[1.7][Code Points][Supported: provided you use the u32* algorithms, then UTF-8, UTF-16 and UTF-32 are all treated as sequences of 32-bit code points.]]
  49. [[2.1][Canonical Equivalence][Not supported: it is up to the user of the library to convert all text into the same canonical form as the regular expression.]]
  50. [[2.2][Default Grapheme Clusters][Not supported.]]
  51. [[2.3Default Word Boundaries][Not supported.]]
  52. [[2.4][Default Loose Matches][Not Supported.]]
  53. [[2.5][Named Properties][Supported: the expression "\[\[:name:\]\]" or \\N{name} matches the named character "name".]]
  54. [[2.6][Wildcard properties][Not Supported.]]
  55. [[3.1][Tailored Punctuation.][Not Supported.]]
  56. [[3.2][Tailored Grapheme Clusters][Not Supported.]]
  57. [[3.3][Tailored Word Boundaries.][Not Supported.]]
  58. [[3.4][Tailored Loose Matches][Partial support: \[\[\=c\=\]\] matches characters with the same primary equivalence class as "c".]]
  59. [[3.5][Tailored Ranges][Supported: \[a-b\] matches any character that collates in the range a to b, when the expression is constructed with the collate flag set.]]
  60. [[3.6][Context Matches][Not Supported.]]
  61. [[3.7][Incremental Matches][Supported: pass the flag `match_partial` to the regex algorithms.]]
  62. [[3.8][Unicode Set Sharing][Not Supported.]]
  63. [[3.9][Possible Match Sets][Not supported, however this information is used internally to optimise the matching of regular expressions, and return quickly if no match is possible.]]
  64. [[3.10][Folded Matching][Partial Support: It is possible to achieve a similar effect by using a custom regular expression traits class.]]
  65. [[3.11][Custom Submatch Evaluation][Not Supported.]]
  66. ]
  67. [endsect]