|
| Regex | compile (const std::string &pattern, std::regex::flag_type flags=std::regex::ECMAScript) |
| | 编译正则表达式并返回 Regex 对象。
|
| Regex::Match | search (const std::string &pattern, const std::string &text) |
| | 搜索第一个匹配(函数式接口)。
|
| Regex::Match | match (const std::string &pattern, const std::string &text) |
| | 从开头匹配(函数式接口)。
|
| std::vector< std::string > | findall (const std::string &pattern, const std::string &text) |
| | 查找所有匹配的字符串(函数式接口)。
|
| std::vector< std::string > | split (const std::string &pattern, const std::string &text, int maxsplit=0) |
| | 分割字符串(函数式接口)。
|
| std::string | sub (const std::string &pattern, const std::string &repl, const std::string &text, int count=0) |
| | 替换匹配的子串(函数式接口)。
|
| std::string | escape (const std::string &s) |
| | 转义正则表达式中的特殊字符。
|