Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/regex/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Regex 如何使用正则表达式从特定点到文本的结尾?_Regex - Fatal编程技术网

Regex 如何使用正则表达式从特定点到文本的结尾?

Regex 如何使用正则表达式从特定点到文本的结尾?,regex,Regex,我想知道什么是合适的正则表达式: In an action unprecedented during 12 years of war in Afghanistan, the commandant of the Marine Corps is firing two top generals. See why: <a onmouseover="LinkshimAsyncLin.swap()>Generals fired over Taliban attack </a>&l

我想知道什么是合适的正则表达式:

In an action unprecedented during 12 years of war in Afghanistan, the commandant of the Marine Corps is firing two top generals. See why: 

<a onmouseover="LinkshimAsyncLin.swap()>Generals fired over Taliban attack </a><br/>security.blogs.cnn.com<br/>There were three investigations of the incident.
海军陆战队司令解雇了两名高级将领,这是阿富汗12年战争中前所未有的行动。看看原因:
]*?/?>
它成功地得到了这部分
这是你想要的吗

onmouseover.*
这是你想要的吗

onmouseover.*

你也应该把你的确切预期匹配应该是什么样子。用文字描述可能会有歧义。。我想从顶部文本返回所有这些内容(因此@Derek answer会这样做:),您还应该输入您的确切预期匹配。用文字描述可能会有歧义。。我想从顶部文本返回所有这些内容(因此@Derek answer会这样做:)