Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

ag incorrectly parses [.][^.]*$ #1529

Open
fragmede opened this issue Aug 9, 2023 · 0 comments
Open

ag incorrectly parses [.][^.]*$ #1529

fragmede opened this issue Aug 9, 2023 · 0 comments

Comments

@fragmede
Copy link

fragmede commented Aug 9, 2023

Hi,

ag incorrectly parses [.][^.]*$.

When I use ag, which uses pcre (note: not pcre2), vs ripgrep, which uses pcre2, I get:

fragmede@samairmac:~/projects/ag_bug$ find . | ag -o  [.][^.]*$ | sort -u  | tail -3
./the_silver_searcher/tests/word_regexp.t
./the_silver_searcher/the_silver_searcher.spec
./the_silver_searcher/the_silver_searcher.spec.in
fragmede@samairmac:~/projects/ag_bug$ find . | rg -o  [.][^.]*$ | sort -u  | tail -3
.w32
.yml
.zig
fragmede@samairmac:~/projects/ag_bug$

According to https://www.pcre.org/, pcre is older and unmaintained, so not sure what the best route going forward would be for ag. (Which I prefer over rg.)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant