Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
{{stub}} | |||
{{Header Nav|game=StrategyWiki:Guide}} | {{Header Nav|game=StrategyWiki:Guide}} | ||
{{wikipedia|Regular expression}} | {{wikipedia|Regular expression}} | ||
Regular expressions, often referred to as a regex or regexp, plural regexes or regexps, are used to help find changes that need to be replaced and to replace them. | Regular expressions, often referred to as a regex or regexp, plural regexes or regexps, are used to help find changes that need to be replaced and to replace them. | ||
==Tools== | ==Tools== | ||
To use a regular expression you will have to have find a code base that can run it. The easiest tools to use are: | To use a regular expression you will have to have find a code base that can run it. The easiest tools to use are: | ||
*Google Chrome extension: [https://chrome.google.com/webstore/detail/search-and-replace/bldchfkhmnkoimaciljpilanilmbnofo Search and Replace 1.2.2] | *Google Chrome extension: [https://chrome.google.com/webstore/detail/search-and-replace/bldchfkhmnkoimaciljpilanilmbnofo Search and Replace 1.2.2] | ||
*TextPad (go to Search >> Replace, or press F8) | *TextPad (go to Search >> Replace, or press F8) | ||
==Syntax differences== | ==Syntax differences== | ||
Note that some tools code their regular expression syntax differently. | Note that some tools code their regular expression syntax differently. For example, TextPad makes uses of simplified expressions, such as [:alpha:] to match a-z and A-Z. | ||
;Uses | |||
*Adding a hundred file names to a table. See [http://strategywiki.org/w/index.php?title=Animal_Crossing:_New_Leaf/List_of_Fossils&diff=prev&oldid=674718 this example]. | *Adding a hundred file names to a table. See [http://strategywiki.org/w/index.php?title=Animal_Crossing:_New_Leaf/List_of_Fossils&diff=prev&oldid=674718 this example]. | ||
**Regex used (in | **Regex used (in TextPad): "| || \([[:alpha:][:blank:]]\{10,20\}\) || \(.\{1,10\}\) Bells" (without quotes). | ||
{{Footer Nav|game=StrategyWiki:Guide|prevpage=Advanced tables|nextpage=Templates}} | {{Footer Nav|game=StrategyWiki:Guide|prevpage=Advanced tables|nextpage=Templates}} |