Regular expression: match start or whitespace

前端 未结 8 1614
无人共我
无人共我 2020-11-29 06:32

Can a regular expression match whitespace or the start of a string?

I\'m trying to replace currency the abbreviation GBP with a £ symbol. I

8条回答
  •  迷失自我
    2020-11-29 07:02

    \b is word boundary, which can be a white space, the beginning of a line or a non-alphanumeric symbol (\bGBP\b).

提交回复
热议问题