Cha*_*ige 5 regex dart flutter
在颤振中使用正则表达式分割时如何保留分隔符?
文本:"this is {{A}} sample {{text}} ..."
我想要的是:["this is", "{{A}}", "sample", "{{text}}", "..."]
我使用了以下正则表达式,
"this is {{A}} sample {{text}} ...".split(RegExp("{{(.*?)}}"))
并得到,["this is ", " sample ", " ..."]
| 归档时间: |
|
| 查看次数: |
776 次 |
| 最近记录: |