Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 About  





2 See also  














Module:Template redirect regex






Аԥсшәа
العربية
Bosanski
فارسی
Bahasa Indonesia

Português

Slovenščina
کوردی
 

Edit links
 









Module
Talk
 

















Read
View source
View history
 








Tools
   


Actions  



Read
View source
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 





Permanently protected module

From Wikipedia, the free encyclopedia
 


About

For use within other modules.

Returns a table of regular expressions, sorted by descending popularity, for a parent template and all redirects to it as of a certain date, or nil.

See also

local p = {}

--returns a table of regular expressions, sorted by descending popularity, for a parent template and all redirects to it as of a certain date, or nil
--regex for the 1st pipe and surrounding whitespace are purposefully omitted to give the calling modules more flexibility
function p.main( template )

 --expand the following table as-needed, following the same format
 local tCanonical_templates = {
  ['Category redirect'] = { 
   --the following 11 pages (6 condensed) redirect to [[Template:Category redirect]], as of 2022/9:
   '{{ *[Cc]ate?g?o?r?y?[ _]*[rR]edirect', --parent+505+312+243+1 transclusions
   '{{ *[Cc]atr',       --21
   '{{ *[Cc]at[ _]*[rR]edir',    --5+3
   '{{ *[Cc]at[ _]*[rR]ed',    --3+2
   '{{ *[Cc]at[ _]*[mM]ove',    --1
   '{{ *[Cc]ategory[ _]*[mM]ove',   --0
  },
  
  ['Taxonbar'] = { 
   --the following 6 pages (3 condensed) redirect to [[Template:Taxonbar]], as of 2023/8:
   '{{ *[Tt]axon?[ _-]?[bB]ar',  --parent+50+11+2+2 transclusions
   '{{ *[Tt]axon[Ii]ds',    --45
   '{{ *[Tt]axon[ _]*[iI]dentifiers', --1
   --detect direct calls to [[Module:Taxonbar]]
   '{{ *#invoke *: *[Tt]axonbar',
  },
 }
 
 return tCanonical_templates[template] or nil
end

return p

Retrieved from "https://en.wikipedia.org/w/index.php?title=Module:Template_redirect_regex&oldid=1221905234"

Hidden category: 
Wikipedia template-protected modules
 



This page was last edited on 2 May 2024, at 18:00 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki