求教正则表达式

如下表,我的研究中需要批量去掉文本头,“TASK 2” 及所有尖括号中的信息,从而得到干净文本。敬请会编写正则表达式的C友赐教,谢谢!


<SPOKEN><TEM4><GRADE2><YEAR03><GROUP130><TASKTYPE 1 2 3><SEX T1=M, T2=M, T3=F, M><RANK=1>
TASK 2
My parents do not have much... knowledge. They are all farmers. When they...in their childhood, because of poor and some <saw> political reasons they missed the chance to go to school. <,> They <they> often <also> mentioned their bitter experiences when they were <are> young and hopping that we can we can seize our my <mild> chances.
 
回复: 求教正则表达式

用一个文本编辑器,比如Notepad++什么的,在替换与查找中选择
正则表达式,然后在 Find what中输入
代码:
<.*?>
点击replace all。

同理,在Find what中输入
代码:
Task \d
再点replace all。
 
Last edited:
Back
顶部