Q:

What's the meaning of ^ and $ symbols in regular expression? 

What's the meaning of the symbols ^ and $ in regular expression. 
For example : 

^[SQBM][0-9]{5,6}$

Thanks

A:

^ is beginning of input and $ is the end of it. 
e.g.

^[0-9] - everything that starts from a digit
[0-9]$ - everything that ends with a digit

And a little bit more detailed description from wiki:

^  Matches the starting position within the string.  In line-based tools, it matches the starting position of any line. 
$  Matches the ending position of the string or the position just before a string-ending newline.  In line-based tools, it matches the ending position of any line.