I have the following HTML:
<html>
<head>
<meta http-equiv="refresh" content="0;URL=http://amazingjokes.com" />
</head>
</html>
I want to find the META with the redirect, so I wrote the following XPath query:
/html/head/meta[@http-equiv="refresh"]
However, the '-' in 'http-equiv' is causing an error:
Invalid regular expression: //html/head/meta[@http-equiv="refresh"]/:
Range out of order in character class
How can I properly rewrite the xpath query to be able to find the meta redirect?
I experimented with this, when I remove the '-' from the HTML code and the query things work as expected, but unfortunately the 'http-equiv' is a set standard, so I can not change that. This experiment showed me I am very close...
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…