Jump to content

User:Jeanenawhitney/Sandbox10/a/doc

From Wikipedia, the free encyclopedia
{{
| ruletype       = 
| description    = 
| name           = 
| type           = 
| find           = 
| replacewith    = 
| regexp         = 
| multiline      = 
| casesensitive  = 
| singleline     = 
| times          = 
| searchexample  = 
| result         = 
| comments       = 
}}
{{ 
| ruletype       = rf <!-- Enter rf, ri, rt, sf, si, or st. see documentation  -->
| description    =    <!-- Enter a short description -->
| name           =    <!-- Give the rule a name -->
| type           = e  <!-- Enter e (for Entire text) or i (for Inside template {{...}}) -->
| find           = <nowiki>replace this text with your regular exression string</nowiki>
| replacewith    = <nowiki>replace this text with your replacement string</nowiki>
| regexp         = c  <!-- Enter c (for checked) or u (for unchecked) -->
| multiline      = u  <!-- Enter c (for checked) or u (for unchecked) -->
| casesensitive  = u  <!-- Enter c (for checked) or u (for unchecked) -->
| singleline     = u  <!-- Enter c (for checked) or u (for unchecked) -->
| times          = 1  <!-- Enter the number of times -->
| searchexample  = <nowiki>replace this text with your search example</nowiki>
| result         = <nowiki>replace this text with your result example</nowiki>
| comments       =    <!-- Enter any comments you wish to display to others -->
}}

Usage

[edit]

Parameters

[edit]
Show example screen shot
Parameter Explanation
ruletype Rule type can be anyone of the following: rf, ri, rt, sf, si, or st. The default is rf.

When entering anyone of these parameters will result in the corresponding default displays:

Parameter Display result
rf Find and replace (rule)
ri In template call (rule)
rt Template parameter (rule)
sf Find and replace (sub rule)
si In template call (sub rule)
st Template parameter (sub rule)
description This is just a simple description of this rule.
name Give the rule a name. If nothing is entered it will display the default of: Rule
type Type can be either e or i. The default is e.
Parameter Display result
e Entire text
i Inside template {{...}}
find This is the regexp (regular expression that you are sharing with others). When entering this place your expression between <nowiki></nowiki>.

As in this example: find = <nowiki>\{\{.*?flagicon.*?\|*?\}\}</nowiki>

This is done because templates can not pass regular expressions to parameters especially the pipe symbol in them.

replacewith This is what your regular expression does when it finds the above regular expression. Note, you may also want to follow the above example by placing your parameter between <nowiki></nowiki>.
regexp regexp can be either c (for checked) or u (for unchecked) . The default is c.
Parameter Display result
c ☑ (checked)
u ☐ (unchecked)
multiline multiline can be either c (for checked) or u (for unchecked) . The default is u.
Parameter Display result
c ☑ (checked)
u ☐ (unchecked)
casesensitive casesensitive can be either c (for checked) or u (for unchecked) . The default is u.
Parameter Display result
c ☑ (checked)
u ☐ (unchecked)
singleline singleline can be either c (for checked) or u (for unchecked) . The default is u.
Parameter Display result
c ☑ (checked)
u ☐ (unchecked)
times Enter the number of times this rule should be applied. Leaving this parameter blank will cause the display default of 1.
searchexample An a example of the text before the rule/sub rule is applied.
result An example of what the above searchexample will do after this rule/sub rule is applied.
comments Any comments that you may want to covey to other AWB users about this regular expression.