Help:Templates/Regexp

From TED Notepad

This template is to be used within the documentation for regular expressions. See the Regular expressions chapter for more details.

Note: Use <nowiki>|</nowiki> to add a pipe into the regexp. Other characters may need the <nowiki> and </nowiki> as well.

Examples

Search pattern like {{regexp|<nowiki>abc|xy</nowiki>}} can search for both {{string|abc}} and {{string|xy}} at the same time.

Search pattern like abc|xy can search for both abc and xy at the same time.


Pattern {{regexp|c{3,5<nowiki>}</nowiki>}} matches triple {{string|ccc}} or {{string|cccc}} or {{string|ccccc}}.

Pattern c{3,5} matches triple ccc or cccc or ccccc.