Chapter 10 Install and System Administration for FortiOS 5.0 : Using the CLI : Tips : Using Perl regular expressions : Differences between regular expression and wildcard pattern matching
  
Differences between regular expression and wildcard pattern matching
In Perl regular expressions, the period (‘.’) character refers to any single character. It is similar to the question mark (‘?’) character in wildcard pattern matching. As a result:
example.com not only matches example.com but also matches exampleacom, examplebcom, exampleccom and so on.
To match a special character such as the period ('.') and the asterisk (‘*’), regular expressions use the slash (‘\’) escape character. For example:
To match example.com, the regular expression should be example\.com.
In Perl regular expressions, the asterisk (‘*’) means match 0 or more times of the character before it, not 0 or more times of any character. For example:
exam*\.com matches exammmm.com but does not match eample.com.
To match any character 0 or more times, use ‘.*’ where ‘.’ means any character and the ‘*’ means 0 or more times. For example:
the wildcard match pattern exam*.com is equivalent to the regular expression exam.*\.com.
See Also
Help
Shortcuts and key commands
Command abbreviation
Environment variables
Special characters
Using grep to filter get and show command output
Language support and regular expressions
Screen paging
Baud rate
Using Perl regular expressions
Word boundary
Case sensitivity
Connecting to the CLI
Command syntax
Sub-commands
Tips