Property talk:P8967
Jump to navigation
Jump to search
Documentation
URL match replacement value
(qualifier only) optional qualifier to overwrite the default \1
(qualifier only) optional qualifier to overwrite the default \1
Data type | String | ||||||
---|---|---|---|---|---|---|---|
Example | According to this template:
see Property talk:P8966
According to statements in the property:
When possible, data should only be stored as statementsFandom article ID (P6262) → \1:\3 NIWA article ID (P12253) → zeldawiki:\1 | ||||||
See also | URL match pattern (P8966), web page title extract pattern (P10999) | ||||||
Lists | |||||||
Proposal discussion | Proposal discussion | ||||||
Current uses |
| ||||||
Search for values |
[create Create a translatable help page (preferably in English) for this property to be included here]
Scope is as qualifier (Q54828449): the property must be used by specified way only (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303). List of violations of this constraint: Database reports/Constraint violations/P8967#Scope, SPARQL
Allowed entity types are Wikibase property (Q29934218): the property may only be used on a certain entity type (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303). List of violations of this constraint: Database reports/Constraint violations/P8967#Entity types
Item “URL match pattern (P8966)”: Items with this property should also have “URL match pattern (P8966)”. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303). List of violations of this constraint: Database reports/Constraint violations/P8967#Item P8966, search, SPARQL
Single value: this property generally contains a single value. (Help)
Exceptions are possible as rare values may exist. Exceptions can be specified using exception to constraint (P2303). List of violations of this constraint: Database reports/Constraint violations/P8967#Single value, SPARQL
Confused
[edit]I'm still really confused as to how to use this. What is \1
? What in the regex indicates more values like \1 \3
? Are they like parameters of the regex? Please explain it as simply as possible. Lectrician1 (talk) 00:50, 20 January 2021 (UTC)
- What are you trying to do with it? It might be easier to explain it in relation to your usecase. --- Jura 01:31, 20 January 2021 (UTC)
- I want to fix the required qualifier constraint (Q21510856) suggestion flag on the URL match pattern (P8966) property in LittleSis organization ID (P3393). Lectrician1 (talk) 05:29, 20 January 2021 (UTC)
- It's optional there. I removed the constraint [1]. --- Jura 15:32, 20 January 2021 (UTC)
- I want to fix the required qualifier constraint (Q21510856) suggestion flag on the URL match pattern (P8966) property in LittleSis organization ID (P3393). Lectrician1 (talk) 05:29, 20 January 2021 (UTC)
- Pretty sure
\1
is meant to indicate a regex capturing group (anything inside()
but not if it has?:
in it) which is confusing since formatter URL (P1630) uses$1
to indicate a regex capturing group. - I is chan (talk) 17:07, 11 July 2022 (UTC)
- Pretty sure
Change the case
[edit]Have come across this a few times, the unique ID itself should be in capitals but the websites that use it don't care, for example IATA airport code (P238) should be three uppercase letters, however "flight radar" uses lowercase https://www.flightradar24.com/airport/bqh
Can "URL match replacement value" take the captured value "bqh" and convert it "BQH" ? Back ache (talk) 02:17, 9 March 2022 (UTC)
- Just replace "bqh" with "(?:bqh|BQH)" this will allow for both all lowercase and all uppercase but BqH will not work - I is chan (talk) 17:10, 11 July 2022 (UTC)
- Sorry I think I misread, bqh is the value? I don't think it is possible to convert cases with regex, you'll have to convert the case via some other method like a program before using it. - I is chan (talk) 17:17, 11 July 2022 (UTC)
- I think I found something:
\U\1
the \U converts the captured group in uppercase I'm not sure if this is supported in wikidata tools or anything though - I is chan (talk) 17:21, 11 July 2022 (UTC)
- I think I found something:
- Sorry I think I misread, bqh is the value? I don't think it is possible to convert cases with regex, you'll have to convert the case via some other method like a program before using it. - I is chan (talk) 17:17, 11 July 2022 (UTC)