促进正则表达式问题 [英] Boost Regular Expression Problem

查看:100
本文介绍了促进正则表达式问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我是提高图书馆正则表达式的新手.对我来说,它有点复杂.我需要将字词格式分开.
格式为

尊敬的客户{Customer.Customer_Id:D}报价{Offer.Offer_Id:D}发件人....

我需要将所有单词和{Customer.Customer_Id:D}分开作为单独的单词,并且过程一直进行到最后一个单词出现为止.

我已尽力而为,但我无法解析上述格式的通用表达式

如果你知道的话告诉我...

在此先感谢
ganesh_IT

Hi guys, i am new to boost libraries regular expression.for me its something complicated.I need to separate word form my format.
The format is

Dear customer {Customer.Customer_Id:D} offer {Offer.Offer_Id:D} From....

i need to separate all words and {Customer.Customer_Id:D} as a separate word and process is going on until the last word occurs.

I try my best but i cant get the general expression for parsing the above format

If you know tell me guys...

Thanks in advance
ganesh_IT

推荐答案

尚不清楚,但似乎您想将{Customer.Customer_Id:D}{Offer.Offer_Id:D}与格式字符串分开.
如果是这样,以下表达将帮助您到达那里.
It is not much clear, but seems like you want to separate {Customer.Customer_Id:D}, {Offer.Offer_Id:D} from your format string.
If so, following expression will help you get there.
{[^\s]+}



如果您不希望{},则可以捕获组



If you don''t want {} then capture groups

{([^\s]+)}


这篇关于促进正则表达式问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆