regular expression patterns pattern metacharacters there are several special characters (often referred to as metacharactersthat have specific meaning within regex patternthese are listed in the following tablecharacter description example [ set of characters indicates special sequence (can also be used to escape special charactersany character with the exception of the newline character [ -dcharacters in the sequence 'ato ' '\dindicates the character should be an integer ' hnindicates that there can be any character after the 'jand before the ' "^helloindicates the string must start with 'hello"world$indicates the string must end with 'world"python*indicates we are looking for zero or more times python is in string "info+indicates that we must find info in the string at least once "john?indicates zero or one instances of the 'john"john{ }this indicates we expect to see the 'johnin the string three times " { , }indicates that there can be one or two xs next to each other in the string "true|okindicates we are looking for either true or ok "(abc|xyz){ }indicates that we are looking for the string abc or xyz repeated twice {indicates string must start with the following pattern indicates string must end with the preceding pattern zero or more occurrences of the preceding pattern one or more occurrences of preceding pattern indicates zero or occurrences of the preceding pattern exactly the specified number of occurrences either or (groups together regular expressionyou can then apply another operator to the whole group special sequences special sequence is combination of '\(backslashfollowed by character combination which then has special meaning the following table lists the common special sequences used in regular expressions