This is not a regular expression, it is a simple filter that uses wild cards. An equivalent regular expression that selects all files with the
.jpg extension is
.*\\.jpg. The details of this regular expression are covered next:
The final expression, Host.*, results in matching any strings that start with
Host and match any of the following host names:
Unlike in a simple file matching filter, C:*, the equivalent regular expression requires a period between the colon ‘:’ and the asterisk ‘*’, as in
C:.*.
Next, we build a regular expression that selects all hosts whose name include the string Host, not just the ones that start with
Host. To do that, simply add a prefix to the above expression,
Host.*, resulting in
.*Host.*.
This expression matches any hosts that include Host, but not necessarily begin with it. That is because the prefix
.* translates to any combination of zero or more characters appearing before the string
Host. The expression matches each of the following host names:
Choosing the second option, the resulting regular expression is: [C-H]:.*. This means, any letter in the range and including ‘C’ through ‘H’, followed by a colon ‘:’, and optionally by more characters.