|
|
|
|
|
by milliams
519 days ago
|
|
I remember when learning regexes, struggling to remember which of ^ and $ were the beginning or end of the line. I know that my (and many other) shells used $ as the prompt symbol - i.e. at the beginning of what I was to type in the terminal. It being at the beginning of that line made it easy for me to remember that it also marks the beginning of regexes. Of course I was 100% incorrect as $ is in fact the end-of-line marker so now I just remember that "it's the opposite"! |
|
"No, the other left..."
For me it was easier to remember what ^ was, as it looks like a pointer of sorts, so felt natural it would be the beginning. Like how a string variable points to the first character.