A '''word''' is defined to be only of these characters: alphanumerics ('{{mono|1=a-z A-Z 0-9}}'), hyphen ('{{mono|1=-}}') and underscore ('{{mono|1=_}}'){{nbsp|1}}{{aye|12px}}. All other characters are non-word characters, and so possible word-separators (like {{nowrap|1='{{mono|1=;,()<space>}}'}}{{nbsp}}{{nay|12px}}).
:Word examples ''todo check+good examples''
:{{mono|1=foo, foobar, foo-bar foo_bar#)($foo123{{nbsp|3}}Foo. FOO..._foo] 12, -x, zob(28)}}
:{{mono|1={{bg|yellow|foo}}, {{bg|yellow|foobar}}, {{bg|yellow|foo-bar}} {{bg|yellow|foo_bar}}#)(${{bg|yellow|foo123}}{{nbsp|3}}{{bg|yellow|Foo}}. {{bg|yellow|FOO}}...{{bg|yellow|_foo}}] [{{bg|yellow|12}}, {{bg|yellow|-x}}}}
:{{mono|1=foo{{bg|orange|, }}foobar{{bg|orange|, }}foo-bar{{bg|orange| }}foo_bar{{bg|1=orange|2=#)($}}foo123{{bg|1=orange|2={{nbsp|3}}}}Foo{{bg|orange|. }}FOO{{bg|orange|...}}_foo{{bg|1=orange|2=] [}}12{{bg|orange|, }}-x}}
'''For example''': your template can use your predefined options as single parameter {{para|format}} input:
:{{para|1=format|2=bg-green, uc_first, wikilink}}
The template then can handle formatting like this:
:<code><nowiki>{{#invoke:sfw|main |explain=true |source={{{format|}}}|word=bg-green |yes=<make bg green code> |no=<do nothing>}}</nowiki></code>
:<code><nowiki>{{#invoke:sfw|main |explain=true |source={{{format|}}}|word=uc_first |yes=<set uc first code> |no=<do nothing>}}</nowiki></code>
Or, using the default output:
:<code><nowiki>{{#if:{{#invoke:sfw|main |explain=true |source={{{format|}}}|word=bg-green}} |<make bg green code> |<do nothing>}}</nowiki></code>
:<code><nowiki>{{#if:{{#invoke:sfw|main |explain=true |source={{{format|}}}|word=uc_first}} |<set uc first code> |<do nothing>}}</nowiki></code>
====newlines (failing) ====
* basic: {{#invoke:User:DePiep/sfw|main |explain=true |s=alpha, "(12) A?", lima, bar|word=foo, "(12) A?" }}
A?" }}
== Usage ==
|