I need to emulate the behavior of \b at the beginning of a line, where I add extra characters to the set, which is considered the boundary of the word. Right now I'm using something like:
"(?<=\\W|\\p{InCJKUnifiedIdeographs})foo"
This works the way I would like it to, unless I start the string being matched: in this case, the statement fails and I don't get hit. What I want is equivalent to a match if I am at the beginning of a line, or foo preceded by a character without a word or ideograph. But I canβt get the right spell to support it.
Any thoughts? Or is it impossible?
Thanks in advance.
source share