mirror of
https://github.com/boostorg/regex.git
synced 2025-07-29 12:07:28 +02:00
changed all pointer casts to explicit static_cast or reinterpret_cast.
Added more tests for forward lookahead asserts. [SVN r12575]
This commit is contained in:
@ -365,7 +365,7 @@ void cpp_tests(const reg_expression<C, T, A>& e, bool recurse = true)
|
||||
}
|
||||
}
|
||||
}
|
||||
if((false == recurse) && (matches[0] == 0) && (matches[1] == search_text.size()))
|
||||
if((false == recurse) && (matches[0] == 0) && (matches[1] == static_cast<int>(search_text.size())))
|
||||
{
|
||||
//
|
||||
// match expected on whole string, so all versions
|
||||
|
@ -871,7 +871,7 @@ a+(?#b+)b+ xaaabbba 1 7
|
||||
|
||||
;
|
||||
; forward lookahead asserts added 21/01/02
|
||||
- match_default normal REG_EXTENDED
|
||||
- match_default normal REG_EXTENDED REG_NO_POSIX_TEST
|
||||
((?:(?!a|b)\w)+)(\w+) " xxxabaxxx " 2 11 2 5 5 11
|
||||
|
||||
/\*(?:(?!\*/).)*\*/ " /**/ " 2 6
|
||||
@ -885,3 +885,18 @@ a+(?#b+)b+ xaaabbba 1 7
|
||||
<\s*a[^>]*>((?:(?!<\s*/\s*a\s*>).)*)(?=<\s*/\s*a\s*>) " <a href=\"here\">here</a> " 1 20 16 20
|
||||
<\s*a[^>]*>((?:(?!<\s*/\s*a\s*>).)*)(?=<\s*/\s*a\s*>) " <a href=\"here\">here< / a > " 1 20 16 20
|
||||
|
||||
; filename matching:
|
||||
^(?!^(?:PRN|AUX|CLOCK\$|NUL|CON|COM\d|LPT\d|\..*)(?:\..+)?$)[^\x00-\x1f\\?*:\"|/]+$ command.com 0 11
|
||||
^(?!^(?:PRN|AUX|CLOCK\$|NUL|CON|COM\d|LPT\d|\..*)(?:\..+)?$)[^\x00-\x1f\\?*:\"|/]+$ PRN -1 -1
|
||||
^(?!^(?:PRN|AUX|CLOCK\$|NUL|CON|COM\d|LPT\d|\..*)(?:\..+)?$)[^\x00-\x1f\\?*:\"|/]+$ COM2 -1 -1
|
||||
|
||||
; password checking:
|
||||
^(?=.*\d).{4,8}$ abc3 0 4
|
||||
^(?=.*\d).{4,8}$ abc3def4 0 8
|
||||
^(?=.*\d).{4,8}$ ab2 -1 -1
|
||||
^(?=.*\d).{4,8}$ abcdefg -1 -1
|
||||
^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{4,8}$ abc3 -1 -1
|
||||
^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{4,8}$ abC3 0 4
|
||||
^(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{4,8}$ ABCD3 -1 -1
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user