URL match pattern (P8966)

From Wikidata
Jump to navigation Jump to search
regex pattern of URL that an external ID may be extracted. Qualifier "URL match replacement value" can overwrite the default \1. Use non-capturing groups when needed "(?:www)?"
  • pattern of URL
  • URL pattern matcher
  • extraction pattern
  • ID extraction pattern
Language Label Description Also known as
English
URL match pattern
regex pattern of URL that an external ID may be extracted. Qualifier "URL match replacement value" can overwrite the default \1. Use non-capturing groups when needed "(?:www)?"
  • pattern of URL
  • URL pattern matcher
  • extraction pattern
  • ID extraction pattern

Data type

String

Statements

0 references
^https?:\/\/(?:www\.wikidata|[a-z]{2,}\.wikipedia)\.org\/wiki\/Special:BookSources\/(\d[\d\-]{15}\d)$
0 references
^https?:\/\/(?:www\.)?iata\.org\/en\/publications\/directories\/code-search\/\?airport\.search=([A-Za-z]{3})
0 references
^https?:\/\/id\.loc\.gov\/authorities\/(?:(?:name|subject)s\/)?((?:n|nb|nr|no|ns|mp|sh)(?:[4-9][0-9]|00|20[0-2][0-9])[0-9]{6})
^(.+) - LC Linked Data Service: Authorities and Vocabularies \| Library of Congress$
0 references
^https?:\/\/lccn\.loc\.gov\/((?:n|nb|nr|no|ns|mp|sh)(?:[4-9][0-9]|00|20[0-2][0-9])[0-9]{6})
0 references
https://regex101.com/?regex=$1
0 references
no value
0 references

Constraints

.*(?!>\\)\((?!\?:).*|
The regular expression must contain at least one matching group. (English)
0 references
The regular expression should not contain straw "wd" (English)
0 references
If the website title (<title> in HTML) contains text that would be useful as a Wikidata item label, specify a regular expression with this property to extract the relevant text to use as a label. Otherwise, if no text in the website title is useful as a label, specify <no value>. (English)
0 references
External identifier properties should have an item that represents their identifier and link to it with this property (English)
0 references
Property should also have constraint for validation and extraction tools (e. g. for formatter pattern ^https?://example\.com/(\w+) constraint may have an extra sanity check for length, \w{1,30}) (English)
0 references