-
Notifications
You must be signed in to change notification settings - Fork 58
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
readDelimiter variant for Regex as delimiter #746
Comments
Say I have (output from
Then I have multiple spacess as delimiters... In some command line outputs, I have two words in one column:
Like that NOT SENT... that's where a regex can help here. It's not just tabs, it's a bunch of spaces. Also, how would you parse Markdown tables (or similar)...? Unless the library trims all those extra spaces... but I guess with markdown there might be more complications that just a delimiter. |
Good questions indeed. I think such tables should be parsed by readDelimStr in the future. For now i can only suggest something like this for Markdown.
|
I think that's a bit of an advanced technique for most people with this kind of use case... and it involves parsing in two steps... I wonder if some kind of readDSL would be better here... it could possibly work by line and give helpers for extracting the titles and values? |
Please share desired API or example of usages that you have in mind. Maybe something like this could be added |
Maybe since this is a function to especially read delimeters, it might be useful to have an override that takes in a Regex as a delimiter... this might be used for command line output tables that are usually space separated but sometimes inside a column value there might be a single space, so I need to use "\s\s+" to correctly read it in.
The text was updated successfully, but these errors were encountered: