If you want to match something only at the beginning or end of a string, you can use the ^
and $
anchors.
^ - matches the beginning of a string (place it at the beginning of the word e.g. ^word
)
$ - matches the end of a string (place it at the end of the word e.g. word$
)
Hint: Remember that the |
symbol is used to separate alternatives
Match only the word "Border" at the beginning and end