Fortinet white logo
Fortinet white logo

Administration Guide

Word boundary

Word boundary

In Perl-style regular expressions, the pattern does not have an implicit word boundary. For example, the regular expression test not only matches the word “test” but also any word that contains “test”, such as attest”, “mytest”, “testimony”, “atestb”. The notation \b specifies the word boundary. To match exactly the word “test”, the expression should be \btest\b.

Word boundary

Word boundary

In Perl-style regular expressions, the pattern does not have an implicit word boundary. For example, the regular expression test not only matches the word “test” but also any word that contains “test”, such as attest”, “mytest”, “testimony”, “atestb”. The notation \b specifies the word boundary. To match exactly the word “test”, the expression should be \btest\b.