Regular expression syntax
.matches any single character. For example,Kamele.onmatchesKameleoon,Kamele0n, andKamele8on.*matches the preceding character zero or more times. For example,Kameleoo*nmatchesKameleon,Kameleoon, andKameleooon.?matches the preceding character zero or one time. For example,Kameleoo?nmatchesKameleonandKameleoon.+matches the preceding character one or more times. For example,Kameleo+nmatchesKameleoonandKameleoooon.|acts as an OR operator between two patterns. For example,Kameleoon|ChameleoonmatchesKameleoonorChameleoon.^matches the start of the string. For example,^Kameleoonmatches URLs starting withKameleoon.$matches the end of the string. For example,Kameleoon$matches URLs ending withKameleoon.()groups several elements, usually combined with|. For example,Kameleoon (AB Testing|Conversion) ToolmatchesKameleoon AB Testing ToolorKameleoon Conversion Tool.[]matches any single character inside the brackets. For example,/Kameleoon/[234]matchesKameleoon 2,Kameleoon 3, andKameleoon 4.-defines a range inside[]. For example,/kameleoon/[2-9]matches every page fromKameleoon 2toKameleoon 9.{}sets a minimum and maximum number of repetitions of the preceding character. For example,Kameleo{2,4}nmatchesKameleoon,Kameleooon, andKameleoooon.
Escape special characters (for example,
,, ., *) with a backslash: \,, \., \*.Regular expressions are case-sensitive.
Examples
^.{10}$matches URLs containing exactly 10 characters.general\.(html|php)$matches URLs ending with eithergeneral.phporgeneral.html./fr/matches URLs containing/fr/./annexes/.*\d{3}matches URLs containing the fragment/annexes/and a three-digit number./annexes/.*\d{2}.*test.html$matches URLs containing the fragment/annexes/, a two-digit number, and ending withtest.html.