正则表达式

boost

regex_match 函数
regex_search 函数
regex_replace 函数
regex_format 函数
regex_grep 函数
regex_split 函数
RegEx 类
 
regex_iterator 迭代器
regex_token_iterator 迭代器
  1. 字符串匹配
  2. 查找字符串
  3. 使用regex_iterator查找
  4. 使用regex_token_iterator拆分字符串

Qt::QRegExp

用正则表达式验证文本有效性

QRegExp::exactMatch来判断一个字符串是否符合一个pattern

用正则表达式提取数据

你可以利用利用正则表达式从一个字符串里提取特定的字段或数据。例如,你可以用以下代码从"a=100"里提取"a"和"100"

用正则表达式修改文本

你可以把字符串中匹配的字符串替换成"一般字符串"

原文地址:https://www.cnblogs.com/zhuqn/p/4308535.html