【发布时间】:2014-03-14 23:09:13
【问题描述】:
我想在下一个 <.br> 之前和最后一个 <.br> 之后剪切 <.br> 之后的所有文本,例如:
string example1 = "some example<br>text1<br>text2";
//do the magic
int match_count = 2;
string match1 = "text1";
string match2 = "text2";
如果不举一个实际的例子就很难解释这个;)
有没有一种简单的方法可以使用正则表达式来完成此任务?
附:更多使用示例:
string example1 = "some example<br>text1";
int match_count = 1;
string match1 = "text1";
和
string example2 = "some example";
int match_count = 0;
【问题讨论】: