How does \b work when using regular expressions?

前端 未结 7 975
孤街浪徒
孤街浪徒 2020-12-03 14:03

If I have a sentence and I wish to display a word or all words after a particular word has been matched ahead of it, for example I would like to display the word fox

7条回答
  •  南笙
    南笙 (楼主)
    2020-12-03 14:52

    You don't need a look behind, you can simply use:

    (\bbrown\s)(\w+)
    

提交回复
热议问题