tmp/tmp57jrm0gr/{from.md → to.md}
RENAMED
|
@@ -20,26 +20,50 @@ template <class OutputIterator, class BidirectionalIterator,
|
|
| 20 |
regex_constants::match_flag_type flags =
|
| 21 |
regex_constants::match_default);
|
| 22 |
```
|
| 23 |
|
| 24 |
*Effects:* Constructs a `regex_iterator` object `i` as if by
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
and uses `i` to enumerate through all of the matches `m` of type
|
| 27 |
`match_results<BidirectionalIterator>` that occur within the sequence
|
| 28 |
\[`first`, `last`). If no such matches are found and
|
| 29 |
-
`!(flags & regex_constants
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
`
|
| 34 |
-
|
| 35 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 36 |
|
| 37 |
Finally, if such a match is found and
|
| 38 |
-
`!(flags & regex_constants
|
| 39 |
-
|
| 40 |
-
`
|
|
|
|
|
|
|
|
|
|
|
|
|
| 41 |
`flags & regex_constants::format_first_only` is non-zero then only the
|
| 42 |
first match found is replaced.
|
| 43 |
|
| 44 |
*Returns:* `out`.
|
| 45 |
|
|
@@ -66,11 +90,11 @@ template <class traits, class charT, class ST, class SA>
|
|
| 66 |
|
| 67 |
*Returns:* `result`.
|
| 68 |
|
| 69 |
``` cpp
|
| 70 |
template <class traits, class charT, class ST, class SA>
|
| 71 |
-
basic_string<charT>
|
| 72 |
regex_replace(const charT* s,
|
| 73 |
const basic_regex<charT, traits>& e,
|
| 74 |
const basic_string<charT, ST, SA>& fmt,
|
| 75 |
regex_constants::match_flag_type flags =
|
| 76 |
regex_constants::match_default);
|
|
|
|
| 20 |
regex_constants::match_flag_type flags =
|
| 21 |
regex_constants::match_default);
|
| 22 |
```
|
| 23 |
|
| 24 |
*Effects:* Constructs a `regex_iterator` object `i` as if by
|
| 25 |
+
|
| 26 |
+
``` cpp
|
| 27 |
+
regex_iterator<BidirectionalIterator, charT, traits> i(first, last, e, flags)
|
| 28 |
+
```
|
| 29 |
+
|
| 30 |
and uses `i` to enumerate through all of the matches `m` of type
|
| 31 |
`match_results<BidirectionalIterator>` that occur within the sequence
|
| 32 |
\[`first`, `last`). If no such matches are found and
|
| 33 |
+
`!(flags & regex_constants::format_no_copy)` then calls
|
| 34 |
+
|
| 35 |
+
``` cpp
|
| 36 |
+
out = std::copy(first, last, out)
|
| 37 |
+
```
|
| 38 |
+
|
| 39 |
+
If any matches are found then, for each such match:
|
| 40 |
+
|
| 41 |
+
- If `!(flags & regex_constants::format_no_copy)`, calls
|
| 42 |
+
``` cpp
|
| 43 |
+
out = std::copy(m.prefix().first, m.prefix().second, out)
|
| 44 |
+
```
|
| 45 |
+
- Then calls
|
| 46 |
+
``` cpp
|
| 47 |
+
out = m.format(out, fmt, flags)
|
| 48 |
+
```
|
| 49 |
+
|
| 50 |
+
for the first form of the function and
|
| 51 |
+
``` cpp
|
| 52 |
+
out = m.format(out, fmt, fmt + char_traits<charT>::length(fmt), flags)
|
| 53 |
+
```
|
| 54 |
+
|
| 55 |
+
for the second.
|
| 56 |
|
| 57 |
Finally, if such a match is found and
|
| 58 |
+
`!(flags & regex_constants::format_no_copy)`, calls
|
| 59 |
+
|
| 60 |
+
``` cpp
|
| 61 |
+
out = std::copy(last_m.suffix().first, last_m.suffix().second, out)
|
| 62 |
+
```
|
| 63 |
+
|
| 64 |
+
where `last_m` is a copy of the last match found. If
|
| 65 |
`flags & regex_constants::format_first_only` is non-zero then only the
|
| 66 |
first match found is replaced.
|
| 67 |
|
| 68 |
*Returns:* `out`.
|
| 69 |
|
|
|
|
| 90 |
|
| 91 |
*Returns:* `result`.
|
| 92 |
|
| 93 |
``` cpp
|
| 94 |
template <class traits, class charT, class ST, class SA>
|
| 95 |
+
basic_string<charT>
|
| 96 |
regex_replace(const charT* s,
|
| 97 |
const basic_regex<charT, traits>& e,
|
| 98 |
const basic_string<charT, ST, SA>& fmt,
|
| 99 |
regex_constants::match_flag_type flags =
|
| 100 |
regex_constants::match_default);
|