Jump to content

Wikipedia:AutoWikiBrowser/Find and replace

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Jeanenawhitney (talk | contribs) at 20:40, 30 January 2008 (Create AWB manual find and replace area). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)
File:AWBfindreplace2.jpg
AWB Find and replace

This is part of the user manual for AutoWikiBrowser.

It is a sub group of the Find and Replace section.

This documentation is not complete, please help expand it.

Please note, this documentation may be out of date, ie features changed, and also may contain features not currently in the release versions of AWB.

Normal

File:AWBfindreplace.jpg
AWB (Normal) Find & Replace

Find and replace

  • Ignore external/Interwiki links, images, nowiki, math, <!-- --> – If checked AWB will ignore said information.
  • Ignore templates, refs, link targets, and headings – If checked AWB will ignore said information.
  • Add replacements to edit summary – If checked AWB will add the replacements made to the edit summary.
  • Apply after general fixes, otherwise before – If checked AWB will apply these rules after all other rulers. Otherwise It will apply these rules before all other rules.
  • Search: – Enter a search criteria in search box.
  • Go – Will search for what was entered in the search box.
  • Clear – Clears all the rules.
  • Done – Exit Find and replace

File:AWBFARBar.jpg

Find – Expression to find.
Replace with – Text to replaced.
Case Sensitive – If checked the search is case sensitive.
Regex – If checked indicates that the find expression is a regular expression.
Multiline This part of the AWB manual needs help in explaining its function. If you know how this function works, please feel free to edit.
Singleline This part of the AWB manual needs help in explaining its function. If you know how this function works, please feel free to edit.
Enabled – If checked indicates that this rule is active. If not checked then this rule will be ignored by AWB.

Advanced

File:AWBreplace specail.jpg
AWB Replace special

This area allows you to set special search and replace criteria for AWB. This can be in the form of regular text searches or regular expression text searches.

  • Main Menus
  • Rule – Allows you to select Rules or Subrules. See Types of rules below.
  • Edit – Various edit commands. Undo, Redo, Cut, Copy, Paste, and Delete

  • Types of rules
  • Rule – Regular rules, AWB will be process these rules (if enabled) against the text of an article.
  • In Template Call Rule – These rules will only be processed if with in a template.
  • Template Parameter Rule – These rules allow you to change template parameter names.
  • Subrule
  • Rule – Same as a regular rule, but only acted upon if the regular rule is acted upon.
  • In Template Call Rule – Same as a regular in template call rule, but only acted upon if the regular in template call rule is acted upon.
  • Template Parameter Rule – Same as a regular template parameter rule, but only acted upon if the regular template parameter rule is acted upon.

  • Name – This allows you to name your rule so that you can recognize it.
  • Enabled – If checked the rule is enabled if unchecked this rule will be ignored by AWB.
  • Type
  • Entire text – lets you search with the entire text string.
  • Inside template calls {{..}} – specifies only search within a template.
  • Find – In this section you enter your search criteria. If you check the Regular expression box on the bottom of the page, the criteria you enter here will be acted on as it is a regular expression. Other wise it will be searched as it were regular text case insensitive.
  • Replace with: – The criteria you place in this box will be replaced with what was found in the Find section.
  • Regular expression – If checked indicates to AWB that the find criteria is a regular expression.
  • Case sensitive – If checked indicates to AWB that the find criteria is case sensitive.
  • Multiline – If checked indicates to AWB that This part of the AWB manual needs help in explaining its function. If you know how this function works, please feel free to edit.
  • Single line – If checked indicates to AWB that This part of the AWB manual needs help in explaining its function. If you know how this function works, please feel free to edit.
  • Apply # times This part of the AWB manual needs help in explaining its function. If you know how this function works, please feel free to edit.


  • If
  • Contains This part of the AWB manual needs help in explaining its function. If you know how this function works, please feel free to edit.
  • Not Contains This part of the AWB manual needs help in explaining its function. If you know how this function works, please feel free to edit.
  • Regular expression – If checked indicates to AWB that the find criteria is a regular expression.
  • Case sensitive – If checked indicates to AWB that the find criteria is case sensitive.
  • Multiline – If checked indicates to AWB that This part of the AWB manual needs help in explaining its function. If you know how this function works, please feel free to edit.
  • Single line – If checked indicates to AWB that This part of the AWB manual needs help in explaining its function. If you know how this function works, please feel free to edit.


subst:

File:AWBsubsttemplates.jpg


Note the section needs expert attention. If you know how this section works, please feel free to edit it.

  • Templates to substitute: This part of the AWB manual needs help in explaining its function. If you know how this function works, please feel free to edit.
  • Ignore external/interwiki links, images, nowiki, math and <!-- --> This part of the AWB manual needs help in explaining its function. If you know how this function works, please feel free to edit.
  • Expand recursively This part of the AWB manual needs help in explaining its function. If you know how this function works, please feel free to edit.
  • Include comment with template This part of the AWB manual needs help in explaining its function. If you know how this function works, please feel free to edit.
  • Clear This part of the AWB manual needs help in explaining its function. If you know how this function works, please feel free to edit.
  • Reset This part of the AWB manual needs help in explaining its function. If you know how this function works, please feel free to edit.
  • OK This part of the AWB manual needs help in explaining its function. If you know how this function works, please feel free to edit.
  • Cancel This part of the AWB manual needs help in explaining its function. If you know how this function works, please feel free to edit.


Regular expression definitions

Expression Description Example
* Zero or more matches
+ One or more matches
? Zero or one matches
{n} Exactly n matches
{n,} At least n matches
{n,m} At least n, but no more than m, matches.
\d Match one number
\d+ Match one or more numbers
\b Match word
() Capture
.*? Match everything

Regular expression examples

Find (expression) Replace with String to search Result Case sensitive
\{\{.*?flagicon.*?\|.*?\}\} {{flagicon|USA} [[United States]] [[United States]] no

User made shortcut editing

You can also make your own shortcut editing macros.

  1. Create a rule
  2. Edit your article. Enter your shortcuts where you want AWB to make the change for you.
  3. Re-parse the page.

Examples: Create a rule as a regular expression.

Name: comment out line

Find: ///col(.*)
Replace: <!-- $1 -->
Article before (with macro highlighted): ///colThis is the line I want to comment out.
After re-parsing: <!-- This is the line I want to comment out. -->

Name: insert line feed

Find: ///br
Replace: <br>
Article before (with macro highlighted): This is an example test line.///br We want to line feed here. ///brAnd here.
After reparsing: This is an example test line.<br> We want to line feed here. <br>And here.