-
Notifications
You must be signed in to change notification settings - Fork 605
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
csvgrep -r doesn't find matches across newlines #368
Comments
I also tried
|
CSVkit from github (revision fa6bade) also fails to find data on newlines. I ran these commands to install it on OS X:
|
Hi Gabe! This looks like a legit bug. I probably need to add a flag to the regex compile. I'll look into it! Thanks for opening an issue! |
Absolutely. If you need someone to test new code or anything, just let me know. I know how hard it is to keep up with even a semi-popular open source project. |
I'm not sure that this is the issue:
also returns no rows. This is because (at least as of 0.9.1/0.9.2) it uses re.match instead of re.search. Simply changing match to search on lines 105 and 116 of grep.py resolve this issue. |
Thanks @edwardros ! |
Add failing test demonstrating #368
Hi! I think problem is still here: |
What is your test.csv? |
It's a datable with combined text and digits. Something like this:
I want to return date from the second column using |
When I run:
The row matches. |
Deeply sorry, I'd used 0.9.1-2 version from Ubuntu repository, which has a bug, resolved in the present version. Now I've installed 1.0.4 from PyPi and everything is all right. |
I'm using csvkit 0.9.0.
Given the following CSV in
test.csv
:csvgrep
can find the row when matching onIRC
, which is on the first line:But when I try to match on
AIM
, which is on a newline but still part of the row,csvgrep
does not find the row:Am I using
-r
incorrectly, or maybe passing it the wrong input?The text was updated successfully, but these errors were encountered: