Opened 2 years ago

Closed 2 years ago

#11988 closed Bugs (fixed)

Variable length hexadecimal escape always fails in basic_regex_parser

Reported by: wbond <will@…> Owned by: John Maddock
Milestone: To Be Determined Component: regex
Version: Boost 1.60.0 Severity: Problem
Keywords: Cc:


Using a variable length hexadecimal escape \x{41} causes the error Hexadecimal escape sequence was invalid.

This appears to be caused by the int cast at

Attachments (0)

Change History (2)

comment:1 Changed 2 years ago by wbond <will@…>

Specifically, this occurs with the type boost::basic_regex<uint32_t>, which explains why (std::numeric_limits<charT>::max)() it overflows int.

comment:2 Changed 2 years ago by John Maddock

Resolution: fixed
Status: newclosed

I believe this is now fixed in:

plus test cases:

Note that strictly speaking this is still only a partial fix as basic_regex<uintmax_t> could still only parse values up until the largest value of intmax_t. It should fix this for char32_t etc though.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain John Maddock.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.