We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05e9473 commit 27241fdCopy full SHA for 27241fd
tools/nimgrep.nim
@@ -649,7 +649,8 @@ else:
649
if optIgnoreStyle in options:
650
pattern = styleInsensitive(pattern)
651
if optWord in options:
652
- pattern = r"\b(:?" & pattern & r")\b"
+ # see https://github.com/nim-lang/Nim/issues/13528#issuecomment-592786443
653
+ pattern = r"(^|\W)(:?" & pattern & r")($|\W)"
654
if {optIgnoreCase, optIgnoreStyle} * options != {}:
655
reflags.incl reIgnoreCase
656
let rep = if optRex in options: rex(pattern, reflags)
0 commit comments