読みやすくするために、無視される空白/改行で std::regex 文字列をフォーマットできますか? Python VERBOSEのように利用可能なオプションはありますか?
詳細なし:
charref = re.compile("&#(0[0-7]+"
"|[0-9]+"
"|x[0-9a-fA-F]+);")
冗長な場合:
charref = re.compile(r"""
&[#] # Start of a numeric entity reference
(
0[0-7]+ # Octal form
| [0-9]+ # Decimal form
| x[0-9a-fA-F]+ # Hexadecimal form
)
; # Trailing semicolon
""", re.VERBOSE)