促进正则表达式问题

编程入门 行业动态 更新时间:2024-10-25 10:28:54
本文介绍了促进正则表达式问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好,我是提高图书馆正则表达式的新手.对我来说,它有点复杂.我需要将字词格式分开. 格式为 尊敬的客户{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]+)}

更多推荐

促进正则表达式问题

本文发布于:2023-10-24 09:32:52,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1523585.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:正则表达式

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!