Skip to content

Commit e111bf7

Browse files
committed
[regex] fix uncaught exception when string is like "\\_"
fixes #129062
1 parent a955426 commit e111bf7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxx/include/regex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3954,7 +3954,7 @@ _ForwardIterator basic_regex<_CharT, _Traits>::__parse_character_escape(
39543954
++__first;
39553955
break;
39563956
default:
3957-
if (*__first != '_' && !__traits_.isctype(*__first, ctype_base::alnum)) {
3957+
if (!__traits_.isctype(*__first, ctype_base::alnum)) {
39583958
if (__str)
39593959
*__str = *__first;
39603960
else

0 commit comments

Comments
 (0)