Closed nisarahamedk closed 6 years ago
The $
is a regular expression end of line, not a literal.
But wouldn't the regex fail to match if the prompt ends with characters other than $?
But wouldn't the regex fail to match if the prompt ends with characters other than $?
Nope, because the $
indicates the end of line, not a literal $
.
Other possible prompts are > and #