简体   繁体   English

posix regex C ++中的pcre regex相等

[英]Equal of pcre regex in posix regex c++

Hello this is my string 你好,这是我的弦

Data1 = "value1";
Data2 = "value2";
Data3 = "value3";

in php i am using this regex 在PHP中,我正在使用此正则表达式

preg_match("/\h*(.*?)\h*[=]\h*[\"](.*?)[\"]\h*[;]/mis", $input_line, $output_array);

and get 3 result 得到3个结果

Data1 = "value1";
Data1
Value1
...
...

now i want to use regex in c++ visual studio to do like this (what i done in php). 现在我想在C ++ Visual Studio中使用正则表达式来做到这一点(我在php中所做的事情)。 i know we can't find 我知道我们找不到

\h*

in c++ regex so please say to me what regex i must use for c++? 在C ++正则表达式中,所以请对我说,我必须为C ++使用什么正则表达式?

\\h matches horizontal whitespace. \\h匹配水平空格。
It includes tabulations and unicode spaces. 它包括制表符和unicode空间。 It's the same as [\\t\\p{Zs}] [\\t\\p{Zs}]

If you don't want to match all unicode spaces, you can simply use [\\t ] that matches tabulations and simple spaces. 如果您不想匹配所有unicode空格,则可以简单地使用[\\t ]来匹配制表符和简单空格。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM