Wikipedia:Reference desk/Archives/Computing/2024 May 28

Computing desk
< May 27 << Apr | May | Jun >> Current desk >
Welcome to the Wikipedia Computing Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


May 28

edit

How to search for fake references (in SparQL or with other methods)

edit

In SparQL, how can I search for stuff like this. So it would start with an opening square bracket, then a number of up to 3 digits, then a closing square bracket.

Is there a way to do this via the normal search box? Is there another, better way? Thanks! Polygnotus (talk) 04:07, 28 May 2024 (UTC)[reply]

I'm not familiar with SparQL, but a regular expression that will serve for a search in most query pattern syntaxes is:
\[[0-9]+\]
Thus will also match "[2024]". If 3 is a hard limit on number of digits, this might work:
\[([1-9]|[1-9][0-9]|[1-9][0-9][0-9])\]
 --Lambiam 10:13, 28 May 2024 (UTC)[reply]
Thank you. I think that the problem is that the article content itself is not on Wikidata, which means I have to try a different approach. It seems like the search function also does not like regex. So I may have to download a dump and use regex. Polygnotus (talk) 11:24, 28 May 2024 (UTC)[reply]