Text rule

The text rule matches text on a webpage or document.

Example uses

  • Avoid use of language prohibited by your corporate guidelines, e.g. the word “disabled”.
  • Find where an old brand name is being used.
  • Find ISBNs.
  • Highlight dates written in a certain format (e.g. YYYY-MM-DD).

Basic text matches

The most common use is to match specific text, e.g. find the word “Silktide”.

Example simple text match in Silktide policy editor

You can find either matches, or whole word matches. For example “test” would be found in “testing”, but not if you match whole words.

To find all matches set Type to Contains. To match only whole word matches, select Contains whole word.

You can check the Case sensitive box to only match the text if the case is identical.

Complex text matches

Advanced users can use regular expressions to implement complex matching rules. Regular expressions are miniature programming language designed to check and match text.

Silktide uses PCRE regular expressions. An example to match a ten digit number would be /[0-9]{10}/. You can learn the basics of PCRE regular expressions here.

Example regex text match in Silktide policy editor

To enter a regular expression, set Type to Regex and enter the regular expression in the Match box.

Need more help?