我正在使用以下模式:
(?<=<)(?<!>).*?q.*?(?!<)(?=>)
它使用正面和负面的前瞻和后视来匹配q包含在匹配括号中的文字。
q
std::regex不支持后视。那么什么是好的选择呢?
std::regex
regex string c++11 regex-lookarounds
c++11 ×1
regex ×1
regex-lookarounds ×1
string ×1