正则表达式,提取两个标签之间的所有东西,怎么写?

正则表达式,提取两个标签之间的所有东西,怎么写?
CONSTITUTION OF THE STATE OF CONNECTICUT
PREAMBLE.
Sec.1.Section 25 of article fourth of the constitution is repealed.
Sec.2.Subsection a.of article twenty-sixth of the amendments to the constitution is amended to
twenty-four hours prior to the time of convening of such special session.Such general assembly shall,upon roll call,by a yea vote of at least two-thirds of the membership of each house,adopt such plan of districting as is necessary to preserve a proper apportionment of representation in accordance with the principles recited in this article.Thereafter the general assembly shall decennially at its next regular session or special session called for the purpose of adopting a plan of districting following the completion of the taking of the census of the United States,upon roll call,by a yea vote of at least two-thirds of the membership of each house,adopt such plan of districting as is necessary in accordance with the provisions of this article.
如何提取和之间的所有内容,
不行啊楼下的几位,我用MTracer试了,还是匹配不上啊。几个答案都试了。就回车和空格的问题吧?
dshlbt 1年前 已收到4个回答 举报

macrosshc 花朵

共回答了18个问题采纳率:100% 举报

(.|n)*(?=)

1年前

2

qilou 幼苗

共回答了1个问题 举报

我想提取字符串中

1年前

1

海梦人生 幼苗

共回答了2个问题 举报


(.|n)*?

1年前

1

舞台米 幼苗

共回答了1个问题 举报

最简单就可以:
1. /]*/>.*/is 这是正则的贪婪模式,提取
和之间的所有内容
2. 如果有多对
和标签,而你只想要第一次出现的标签之间的内容,可以用非贪婪模式:
/]*/>.*?/is
后面的's'必须加入,这是个修...

1年前

1
可能相似的问题
Copyright © 2024 YULUCN.COM - 雨露学习互助 - 20 q. 0.337 s. - webmaster@yulucn.com