Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Bug in search regex ? #291

Closed
udf2457 opened this issue Feb 21, 2022 · 7 comments
Closed

Bug in search regex ? #291

udf2457 opened this issue Feb 21, 2022 · 7 comments

Comments

@udf2457
Copy link

udf2457 commented Feb 21, 2022

Was messing around with the Tranco list and xsv (0.13.0) today and came across a possible bug.

xsv search -s 2 'uk$' top-1m.csv | grep -Ev 'uk$'         
1,google.com

Surely that's not right ?

@BurntSushi
Copy link
Owner

Please provide a minimal reproduction.

@udf2457
Copy link
Author

udf2457 commented Feb 21, 2022

@BurntSushi Erm....

I'm not sure how much more "minimal" I can get than the one-liner I provided above and my use of an open-source csv file ?

@BurntSushi
Copy link
Owner

"minimal" doesn't just apply to the command. It also applies to the input. You gave me a link to a web site, and that link mentions the word csv precisely zero times. I don't know what you downloaded. Please provide the input data here. Ideally, it would only contain the record that is matching but shouldn't be. Otherwise, please provide a direct link to download precisely the data you're using.

@ghuls
Copy link

ghuls commented Feb 21, 2022

First line of a CSV file is used as a header by default.

xsv search -n -s 2 'uk$' top-1m.csv

@udf2457
Copy link
Author

udf2457 commented Feb 21, 2022

it would only contain the record that is matching but shouldn't be

See my original post. It contains the line that is matching but shouldn't be.

@ghuls
Copy link

ghuls commented Feb 21, 2022

Add -n for not using the first line as a header.

@udf2457 udf2457 closed this as completed Feb 21, 2022
@BurntSushi
Copy link
Owner

@udf2457 This is a very frustrating exchange for me. If you don't want to work with me to find a resolution to your problem, then don't file a bug reports. In the future, please provide the inputs.

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

No branches or pull requests

3 participants