Genivia / ugrep

NEW ugrep 7.1: a more powerful, ultra fast, user-friendly, compatible grep. Includes a TUI, Google-like Boolean search with AND/OR/NOT, fuzzy search, hexdumps, searches (nested) archives (zip, 7z, tar, pax, cpio), compressed files (gz, Z, bz2, lzma, xz, lz4, zstd, brotli), pdfs, docs, and more
https://ugrep.com
BSD 3-Clause "New" or "Revised" License
2.66k stars 111 forks source link

Problem with --fixed-strings and --file FILE when FILE contains an \E #417

Closed genivia-inc closed 3 months ago

genivia-inc commented 3 months ago

Options --fixed-strings --file FILE can bail out with a pattern syntax error before searching an input file when the string pattern FILE contains an \E sequence somewhere. This happens because \E ends a literal regex quoted string that confuses the pattern matcher engine. It should handle this the same way as --fixed-strings does for command-line argument string patterns where this problem does not occur.

Test case: echo 'test\Ethis' | ugrep -F -f - some_file.txt

genivia-inc commented 3 months ago

It's a simple fix. Will release an update today.