[英]Replace extraspaces of a string after pattern matching using rwcrexpr in C++
I have a string like below 我有一个像下面的字符串
std::string = "S.ID="1234" S.NAME="Sachin" S.NICKNAME="God of cricket" S.CITY="MUMBAI";
I need to replace each extra spaces after the pattern ="*" with a single space using RWCRexpr 我需要使用RWCRexpr用单个空格替换模式=“ *”之后的每个多余空格
Any help on this? 有什么帮助吗?
The regular expression \\s*=\\s*"\\[^\\"\\]*"(\\s{2,})
will match your extra spaces. 正则表达式
\\s*=\\s*"\\[^\\"\\]*"(\\s{2,})
将与您的多余空格匹配。
Hovewer, according to the online documentation, RWCRexpr
is deprecated and your should use RWTRegex<T>
instead. Hovewer,根据联机文档,
RWCRexpr
已经过时和你应该使用RWTRegex<T>
代替。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.