I never remember whether ^
matches the beginning of the line and $
matches the end of it or the other way around. A good mnemonic would be that the $
sign is always before the price, therefore it matches the beginning of a line - unfortunately it's the other way around.
So is there any reason why these two characters were chosen for the beginning and end of line?
^
,$
I interpret it as start and end. E.G. See the $ of the document. If you ever usevi
you'll notice0
,$
means start and end. – Nitrification