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

How to apply a tab-delimiter to columnizer #271

Open
kkwaiser opened this issue Oct 17, 2022 · 3 comments
Open

How to apply a tab-delimiter to columnizer #271

kkwaiser opened this issue Oct 17, 2022 · 3 comments
Labels

Comments

@kkwaiser
Copy link

Is there a simple way to columnize tab-delimited file? I'm aware I can use a Regex columnizer that repeats the following sequence

(.*\t)+(.*\t)+(.*\t)+(.*)

However, this approach requires hard-coding the number of columns by repeating the tab (\t) checks. The CSV Columnizer could work for this except the Delimiter char field only accepts a single character. In other words "\t" is too long to insert. I feel like tab-delimited files are common enough that there should be a straightforward approach to columnizing them. Am I missing something?

@Hirogen
Copy link
Collaborator

Hirogen commented Oct 18, 2022

I think regex is the wrong tool for the job, it's rather complicated to fetch multiple tab-delimited capturing groups if you don't know how many "columns" there are!

https://stackoverflow.com/questions/37003623/how-to-capture-multiple-repeated-groups

@Hirogen Hirogen added the question ??_?? label Oct 18, 2022
@maddin30
Copy link

Hello.

Would a Regex Columnizer be an option?

grafik

Maybe this could meet your expectations.

@Northman-de
Copy link

It's much easier: use the csv columnizer and copy&paste a single TAB-character from Notepad to the "delimiter char" field.
Works for me since a decade :-)

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

No branches or pull requests

4 participants