The ^ symbol matches the position at the start of a string.

The $ symbol matches the position at the end of a string.
Task
You have a test string . Your task is to match the pattern
Here, denotes a word character, and
Here, denotes a word character, and

