*$ means – match, from beginning to end, any character that appears zero or more times . Basically, that means – match everything from start to end of the string.
What does ‘$’ mean in regex?
$ means “Match the end of the string ” (the position after the last character in the string). Both are called anchors and ensure that the entire string is matched instead of just a substring.