Module:Str find word/doc: Difference between revisions

Content deleted Content added
No edit summary
Line 9:
 
For example, in the string '{{mono|1=alpha, foobar}}' the word '{{mono|1=alpha}}' appears, but the word '{{mono|1=foo}}' does not: there only is the complete word '{{mono|1=foobar}}'. The module is aimed at template code usage. <small>(The editor does not have to apply Lua patterns like {{code|1=[%a%d]*}})</small>.
 
:True: {{#invoke:Str find word|main |source=alpha, beta, omega|word=beta}} &rarr; >{{#invoke:Str find word|main |explain=true |source=alpha, beta, omega|word=beta}}<
:False: {{#invoke:Str find word|main |source=alpha, beta, omega|word=gamma}} &rarr; >{{#invoke:Str find word|main |source=alpha, beta, omega|word=gamma}}<
 
 
The search can be extended to check for multiple words being present.