0
我想查找對應於特定網站的維基數據資源。這是我的查詢SPARQL中的正則表達式:爲什麼[[:alnum:]]不返回匹配項?
SELECT DISTINCT ?resource ?instanceOfLabel ?website
WHERE
{
?resource wdt:P856 ?website.
FILTER (REGEX(str(?website), 'http(s)?://(\\w.)?smh.com.au/$')) .
}
}
(鏈接here) 不返回任何結果。這不是我所期望的,因爲
SELECT DISTINCT ?resource ?instanceOfLabel ?website
WHERE
{
?resource wdt:P856 ?website.
FILTER (REGEX(str(?website), 'http(s)?://www.smh.com.au/$')) .
}
(鏈接here)
你有什麼期望是'(\\ W)'的意思?我的意思是你期望與之相匹配,以及它如何反映網站情況? – AKSW