Regex - List Operators Go to the previous , next section. Lists , also called bracket expressions , are a set of one or more items. An item is a character, a character class expression, or a range expression. The syntax bits affect which kinds of items you can put in a list. We explain the last two items in subsections below.
Empty lists are invalid.
A matching list matches a single character represented by one of the list items. Nonmatching lists are similar to matching lists except that they match a single character not represented by one of the list items. Most characters lose any special meaning inside a list. The special characters inside a list follow. All other characters are ordinary.