等于 posix 正则表达式 c++ 中的 pcre 正则表达式
Equal of pcre regex in posix regex c++
你好,这是我的字符串
Data1 = "value1";
Data2 = "value2";
Data3 = "value3";
在 PHP 中,我正在使用这个正则表达式
preg_match("/h*(.*?)h*[=]h*["](.*?)["]h*[;]/mis", $input_line, $output_array);
并获得 3 个结果
Data1 = "value1";
Data1
Value1
...
...
现在我想在C ++ Visual Studio中使用正则表达式来做这件事(我在PHP中所做的)。 我知道我们找不到
h*
在 C++ 正则表达式中,请告诉我我必须为 C++ 使用什么正则表达式?
h
匹配水平空格。
它包括表格和 unicode 空格。它和[tp{Zs}]
一样
如果您不想匹配所有 unicode 空格,只需使用匹配表格和简单空格的[t ]
即可。
相关文章:
- 使用正则表达式regex_search在字符串中查找字符串
- 在 C++ 中使用正则表达式错误时出现问题 括号表达式中的范围无效
- C++正则表达式无限循环
- FindPackageHandleStandardArgs.cmake:137 的 CMake 错误(消息):找不到 Boost (缺少:正则表达式)(找到合适的版本"1.72.0",
- 定义有趣的宏和正则表达式在Z3 C++绑定
- 带有多个字符分隔符的正则表达式
- C++ 使用增强正则表达式库时断言崩溃
- 有人可以帮助我处理正则表达式吗?
- 使用正则表达式获取大括号块的列表
- 正则表达式以匹配数字的重复模式,后跟任何类型的分隔符?
- 组合正则表达式部分使用 | 不起作用的 C++
- 为什么C++正则表达式这么慢?
- 如何使HTML5电子邮件验证正则表达式在C++中工作?
- 为什么 pcre 正则表达式比 c++11 正则表达式快得多
- 提高Boost正则表达式的速度或在C++中使用PCRE
- C++正则表达式与PCRE表达式一起不工作
- 是否可以构造与 3 个或更多非连续 UTF 代码点匹配的 PCRE UTF-8 正则表达式
- 如何在 C/C++ PCRE 正则表达式中使用 UTF-8 文字字符
- 等于 posix 正则表达式 c++ 中的 pcre 正则表达式
- 将Python正则表达式转置为PCRE