Wikidata:Property proposal/applies if regular expression matches
applies if regular expression matches id
|Description||the statement is only true, if the id matches this regex|
|Allowed values||valid regular expression with at least one capture group|
Fandom article ID (P6262) and Gamepedia article ID (P6623) use a third party services to resolve ids to urls. but i think it could be done entirely on wikidata, if it was possible to pass multiple variables to the formatter URL (P1630). This is a proposal to do that.
We'd need a qualifier holding a regular expression.
- the regex will be used to determine which formatter url shall be used. therefore it must not match if the supplied id does not hold the required number of variables.
- the regex will also be used to extract the variables from the id to the formatter url.
- as a fallback an external resolver may be used if no regex matches the id. this fallback should be highlighted somehow. For this proposal I chose no value. formatter urls that match the regular expression must be preferred.
- Do you intend to engage the Wikidata developers so this can be supported in the UI, or how otherwise would you envision this to be actually used? ArthurPSmith (talk) 15:31, 18 February 2020 (UTC)
- @Shisma: Also maybe relevant - see Phabricator Task T150939 ArthurPSmith (talk) 19:27, 20 February 2020 (UTC)