Custom word boundaries in regular expression

前端 未结 1 1941
难免孤独
难免孤独 2021-01-06 04:03

I am trying to match words using a regular expression, but sadly the word boundary character (\\b) does not include enough characters for my taste, so I want to add more. (i

1条回答
  •  渐次进展
    2021-01-06 04:12

    (no need to escape the + in a character class)

    The problem is that you use a negative lookahead first whereas you should use a negative lookbehind. Try:

    @"(?

    0 讨论(0)
提交回复
热议问题