Comparing Regular Expressions and Wildcards

A wildcard or regular expression can be used to accomplish the same thing.

Table 1. Wildcards and Regular Expressions with the same meaning

Wildcard (*)

Regular expression

Meaning

*chair*

chair

Contains chair

*chair

chair$

Ends with chair

chair*

^chair

Begins with chair

chair (no wildcard)

^chair$

Matches chair exactly