Regex to match exact phrase, nothing before or after the phrase

前端 未结 2 904
故里飘歌
故里飘歌 2020-12-13 13:38

I am not sure if this is exactly possible. Consider this example set of data:

Mountain
Big mountain
Mountain of stone
A mountain on a hill

2条回答
  •  不知归路
    2020-12-13 14:06

    To match the exact line "Mountain" use this: /^Mountain$/

    You haven't mentioned what language you're working in, so the exact form of the pattern might have to change.

提交回复
热议问题