Context: regular expressions, regexp, regex

In regular expressions (or regexp, or even regex)pattern matching syntax, the asterisk (*) represents a quantifier of 0 or more instances of the previous character or group. Thus a* matches 0 or more as, .* matches 0 or more characters and (foo|bar)* matches 0 or more instances of foo or bar.

An exception of this occurs in character classes, where an asterisk just represents an asterisk. To specify an asterisk in places outside of character classes, use the expression \*.