Match exact string

What is the regular expression (in JavaScript if it matters) to only match if the text is an exact match? That is, there should be no extra characters at other end of the string.

For example, if I’m trying to match for abc, then 1abc1, 1abc, and abc1 would not match.

3 Answers
3

Leave a Comment