Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/libs/xpressive/doc/regexpp_diffs.qbk @ 69

Last change on this file since 69 was 29, checked in by landauf, 17 years ago

updated boost from 1_33_1 to 1_34_1

File size: 2.4 KB
Line 
1[section Appendix 2: Differences from Boost.Regex]
2
3Since many of xpressive's users are likely to be familiar with the _regexpp_ library,
4I would be remiss if I failed to point out some important differences between xpressive
5and _regexpp_. In particular:\n
6
7* `xpressive::basic_regex<>` is a template on the iterator type, not the character type.
8* `xpressive::basic_regex<>` cannot be constructed directly from a string; rather, you must use
9  `basic_regex::compile()` or `regex_compiler<>` to build a regex object from a string.
10* `xpressive::basic_regex<>` does not have an `imbue()` member function; rather, the `imbue()` member
11  function is in the `xpressive::regex_compiler<>` factory.
12* `boost::basic_regex<>` has a subset of `std::basic_string<>`'s members. `xpressive::basic_regex<>`
13  does not. The members lacking are: `assign()`, `operator[]()`, `max_size()`, `begin()`, `end()`,
14  `size()`, `compare()`, and `operator=(std::basic_string<>)`.
15* Other member functions that exist in `boost::basic_regex<>` but do not exist in
16  `xpressive::basic_regex<>` are: `set_expression()`, `get_allocator()`, `imbue()`, `getloc()`,
17  `getflags()`, and `str()`.
18* `xpressive::basic_regex<>` does not have a RegexTraits template parameter. Customization of regex
19  syntax and localization behavior will be controlled by `regex_compiler<>` and a custom regex facet
20  for `std::locale`.
21* `xpressive::basic_regex<>` and `xpressive::match_results<>` do not have an Allocator template
22  parameter. This is by design.
23* `match_not_dot_null` and `match_not_dot_newline` have moved from the `match_flag_type` enum to the
24  `syntax_option_type` enum, and they have changed names to `not_dot_null` and `not_dot_newline`.
25* The following `syntax_option_type` enumeration values are not supported: `escape_in_lists`,
26  `char_classes`, `intervals`, `limited_ops`, `newline_alt`, `bk_plus_qm`, `bk_braces`, `bk_parens`,
27  `bk_refs`, `bk_vbar`, `use_except`, `failbit`, `literal`, `perlex`, `basic`, `extended`, `emacs`,
28  `awk`, `grep` ,`egrep`, `sed`, `JavaScript`, `JScript`.
29* The following `match_flag_type` enumeration values are not supported: `match_not_bob`,
30  `match_not_eob`, `match_perl`, `match_posix`, and `match_extra`.
31
32
33Also, in the current implementation, the regex algorithms in xpressive will not detect
34pathological behavior and abort by throwing an exception. It is up to you to write efficient
35patterns that do not behave pathologically.
36
37[endsect]
Note: See TracBrowser for help on using the repository browser.