Here is a list of special regular expression characters with examples. More examples can be found here.
Meta Character | Function | Example |
---|---|---|
* | Zero or more of the previous character | lo*ng: Matches "lng", "long", "looooooooooong" |
? | Zero or one of the previous character | George W? Bush: Matches "George Bush" and "George W Bush" |
+ | One or more of the previous character | fo+d: Matches "fod", "food", "fooooooooood" |
. | Any single character | tre.: Matches "tree", "trek", "tred" |
[] | Any character from the set | the[emn]: Matches "thee", "them", "then" |