Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
Revision as of 00:01, 20 February 2025 by Prd (talk | contribs) (Created page with "{{Documentation subpage}} {{lua|Module:String2}} <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> Wrapper for findpagetext function in Module:String2. '''Template:Find page text''' returns the position of a piece of text in the wikitext source of a page. == Parameters == The template takes up to four parameters: * {{para|1}} or {{para|text}} is the text to be searched for. * Optional parameter {{para|title}} is the page...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Wrapper for findpagetext function in Module:String2.

Template:Find page text returns the position of a piece of text in the wikitext source of a page.

Parameters

The template takes up to four parameters:

  • |1= or |text= is the text to be searched for.
  • Optional parameter |title= is the page title, defaults to the current page.
  • Optional parameter |plain= is either true for a plain search (default), or false for a Lua pattern search.
  • Optional parameter |nomatch= is the value returned when no match is found; default is nothing.

Examples

The search is case-sensitive, so Lua pattern matching is needed to find river or River. The last example finds {{coord or {{Coord. The penultimate example finds a wiki-link.

See also