mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-01-24 13:56:47 +02:00
2a2b1506d4
The specific issue is that -w causes the regex to be wrapped in Unicode word boundaries. Regrettably, Unicode word boundaries are the one thing our regex engine can't handle well in the presence of non-ASCII text. We work around its slowness by stripping word boundaries in some circumstances, and using the resulting expression as a way to produce match candidates that are then verified by the full original regex. This doesn't fix all cases, but it should fix all cases where -w is used.
grep
This is a library that provides grep-style line-by-line regex searching (with
comparable performance to grep
itself).