User:L10nM4st3r/sandbox/regex

From Uncyclopedia, the content-free encyclopedia
Jump to navigation Jump to search

If you use the wTools, the find and replace tool allows you to search for regular expressions (RegEx).


Input the following into "search...": \[\[(.+)\|(.+)\]\], which allows you to search for any piped link.

Input the following into "replace...": {{$1|$2}}. Now, pressing "replace" will turn any square brackets in piped links into squiggly brackets. Undo the changes, and mess with both the regex, and the replace value.


To learn more about how regex works, and to practise with it, please see regex101.com.




To add line breaks, simply add \n to the replace or the search box, and they will be replaced with line breaks.