Search results
Results from the WOW.Com Content Network
Download as PDF; Printable version; ... This template is used in MediaWiki: ... which replaces only the first occurrence of a string. mw:Extension:ParserFunctions ...
This template removes the last word of the first parameter, i.e. the last non-space token after the last space. Use |1= for the first parameter if the string may contain an equals sign (=). By default, words are delimited by spaces, but the optional parameter |sep= can set the separator to any character.
Help; Learn to edit; Community portal; Recent changes; Upload file; Special pages
The indices are one-based (meaning the first is number one), inclusive (meaning the indices you specify are included), and may be negative to count from the other end. For example, {{#invoke:string|sub|12345678|2|-3}} → 23456. Not all the legacy substring templates use this numbering scheme, so check the documentation of unfamiliar templates.
The template trims matched pairs of leading and trailing single and double quotes from a string. Template parameters [Edit template data] Parameter Description Type Status String 1 The string to be trimmed String required See also {{ trim }}
This template returns the last word of the first parameter, i.e. the last non-space token after the last space. Use |1= for the first parameter if the string may contain an equals sign (=). By default, words are delimited by spaces, but the optional parameter |sep= can set the separator to any character.
This is the template test cases page for the sandbox of Template:Deletion process cheat sheet/Last Afd Purge this page to update the examples. If there are many examples of a complicated template, later ones may break due to limits in MediaWiki ; see the HTML comment " NewPP limit report " in the rendered page.
New code should strongly consider {{#invoke:string|replace}} or {{#invoke:MultiReplace|main}}. For backward compatibility, both the input and pattern string are trimmed of surrounding whitespace before processing begins. This means you cannot remove three instances of "the " from "the the the thing"; instead you will remove one instance of "the".