Regex / Xpath在div容器中查找具有特定字符串的页面(Screaming Frog SEO)

时间:2016-03-07 13:06:25

标签: regex xpath

使用Screaming Frog SEO可以使用XPath或Regex从源中提取某些元素。

现在我希望每个页面都显示“test10”字样,但这个词出现在子菜单的所有页面上。所以这个词需要在源的特定部分。我已经尝试过很多次了,但它没有按照应有的方式运行。

实施例

<div id="contentContainer">
... (several other div's and content ...
test10 ... (several other div's and content ...
</div>

我只想知道哪个页面包含带有contentContainer的单词'test10'。

有人可以帮帮我吗?

关于, Jelte

1 个答案:

答案 0 :(得分:0)

我们可以使用contains()检查文本中所需div内的任何元素是否test10

//div[@id="contentContainer"]//*[contains(., "test10")]
相关问题