I'm looking for a sed solution like the one here: Print everything after nth delimiter
sed -E 's/^([^\]*[\]){3}//' infile
but to extract the text before nth delimiter, instead of nth delimiter like the example. Something that works with all sed variants. And operate on all lines like the example.
The delimiter in this example is \ but could be for any other. Should work with any version of sed.
sedimplementation you are using, ii) show us an example input file and iii) the output you expect. We cannot help you parse data you don't show. You mention a delimiter, what is that delimiter? Should we guess you have `` as the delmiter?sed -E 's/(^([^\]*[\]){3}[^\]*).*/\1/' infile. You can replace "\" with a letter like "e" or a number and keeps running:sed -E 's/(^([^e]*[e]){3}[^e]*).*/\1/' infile. So you are not willing to put the effort to elaborate your answer dude.