Skip to main content
edited body
Source Link
Nicolas Raoul
  • 8.5k
  • 5
  • 29
  • 61

The trick is to use str inside the contains.

This query gives the expected result:

select ?item ?img
{
  hint:Query hint:maxParallel 400 .
  hint:Query hint:chunkSize  8000 .
  ?item wdt:P18 ?img . 
  filter contains(str(?img), "Montage")
}

Try itTry it

Another way to achieve this is to set hint:Query hint:regexMatchNonString true and then use a normal regex.

(Huge thanks to Stanislav Kralin who found all this)

The trick is to use str inside the contains.

This query gives the expected result:

select ?item ?img
{
  hint:Query hint:maxParallel 400 .
  hint:Query hint:chunkSize  8000 .
  ?item wdt:P18 ?img . 
  filter contains(str(?img), "Montage")
}

Try it

Another way to achieve this is to set hint:Query hint:regexMatchNonString true and then use a normal regex.

(Huge thanks to Stanislav Kralin who found all this)

The trick is to use str inside the contains.

This query gives the expected result:

select ?item ?img
{
  hint:Query hint:maxParallel 400 .
  hint:Query hint:chunkSize  8000 .
  ?item wdt:P18 ?img . 
  filter contains(str(?img), "Montage")
}

Try it

Another way to achieve this is to set hint:Query hint:regexMatchNonString true and then use a normal regex.

(Huge thanks to Stanislav Kralin who found all this)

Source Link
Nicolas Raoul
  • 8.5k
  • 5
  • 29
  • 61

The trick is to use str inside the contains.

This query gives the expected result:

select ?item ?img
{
  hint:Query hint:maxParallel 400 .
  hint:Query hint:chunkSize  8000 .
  ?item wdt:P18 ?img . 
  filter contains(str(?img), "Montage")
}

Try it

Another way to achieve this is to set hint:Query hint:regexMatchNonString true and then use a normal regex.

(Huge thanks to Stanislav Kralin who found all this)