Genivia / ugrep

NEW ugrep 6.5: 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.56k stars 109 forks source link

[QUESTION] Help me with a strict (fixed) search #358

Closed AngryPhantom closed 6 months ago

AngryPhantom commented 6 months ago

First of all, thank you for your awesome work.

This is not an issue, but a question.

I have a number of files (logs) in a directory.

I run a command to start an interactive searching through the file contents:

ugrep -Q -Z --sort=best -%

Then start typing some short query like ud3 and get this: http://0x0.st/HnRo.png

As you see it doesn't search the strict sequence of symbols. Even shows me some that are not relevant at all.

If I add option -w:

ugrep -Q -Z -w --sort=best -%

I see this: http://0x0.st/HnRH.png. Though the fields are there actually.

Help me please interactively search for a fixed (strict) sequence of symbols. Thank you in advance.

AngryPhantom commented 6 months ago

P.S.

If I run:

ugrep -Q -w -F --sort=best -%

And then start typing ud3 I get [no matches found].

data-man commented 6 months ago

Works with pcre2 and -P.

AngryPhantom commented 6 months ago

Thanks to @data-man:

ugrep -Q -P -F --sort=best -%

or

ugrep -Q -P -F --sort=created -%

The latter is really handy for logs. Closing the issue/question.