我需要获得引号之间的条目,如本例中所示:Regex href="x....dkjads...href="y"
,它返回x
和y
。你知道吗
[<a class="lightbox" href="fileadmin/user_upload/images/Sprachen/Englisch/USA/San_Diego/San_Diego_EC/EC_San_Diego_Galerie.jpg" title=""><img alt="Sprachschule EC San Diego" border="0" height="80" src="typo3temp/pics/EC_San_Diego_Galerie_d1def1bf4a.jpg" title="Sprachschule EC San Diego (Copyright EC San Diego. All rights reserved.)" width="80"/></a>, <a class="lightbox" href="fileadmin/user_upload/images/Sprachen/Englisch/USA/San_Diego/San_Diego_EC/EC_San_Diego_Galerie-_1_.jpg" title=""><img alt="Sprachschule EC San Diego 2" border="0" height="80" src="typo3temp/pics/EC_San_Diego_Galerie-_1__fd87630014.jpg" title="Sprachschule EC San Diego 2 (Copyright EC San Diego. All rights reserved.)" width="80"/></a>, <a class="lightbox" href="fileadmin/user_upload/images/Sprachen/Englisch/USA/San_Diego/San_Diego_EC/EC_San_Diego_Galerie-_10_.jpg" title=""><img alt="Sprachschule EC San Diego 3" border="0" height="80" src="typo3temp/pics/EC_San_Diego_Galerie-_10__a8ed60c277.jpg" title="Sprachschule EC San Diego 3 (Copyright EC San Diego. All rights reserved.)"
如何在regex中输入以在开始时搜索多个精确字符?你知道吗
这个(?<=\").*?(?=\")
返回" "
和(?<=\{href="}).*?(?=\")
之间的所有内容
如果要匹配
href="<content>"
中的<content>
,则要匹配的模式是href=\"(.*?)\"
(regex101 demo)。你知道吗使用python
re
模块,您可以执行以下操作:希望这有帮助。你知道吗
相关问题 更多 >
编程相关推荐