Caret symbol (^) match with the early of the string which is to examine whether the string is started with the character that is given or not. For example:
^m
will examine whether string is started with m
such as my, myskill, myth, etc.^m
will examine whether string is started with my
such as myths, myriad, etc.The Dollar Symbol ($) match with the end of string which is examining whether the string is ended with the character that is given or not. For example:
Dot symbol (.) only match with a character except for new basis character (\n).
For example:
Or symbol has a function as operator, or it means to examine whether the pattern before or after the symbol exist in the string or not. For example,
Question Mark (?) will examine whether the string before the question mark in regular expression appears at least once or not at all. For example: