Convert CSV records to TSV: Difference between revisions
Content added Content deleted
m (→{{header|jq}}: typo) |
(Category:PEG) |
||
Line 14: | Line 14: | ||
; A CSV record |
; A CSV record |
||
[[Category:PEG]] |
|||
Our starting point will be a character set that includes ASCII; the language |
Our starting point will be a character set that includes ASCII; the language |
||
of regular expressions (which will be denoted by strings of the form |
of regular expressions (which will be denoted by strings of the form |
||
r'REGEX'); and the following PEG (parsing expression grammar) grammar for a |
r'REGEX'); and the following [[:Category:PEG|PEG]] (parsing expression grammar) grammar for a |
||
single CSV record: |
single CSV record: |
||
<pre> |
<pre> |
||
Line 378: | Line 379: | ||
</syntaxhighlight> |
</syntaxhighlight> |
||
{{output}} |
{{output}} |
||
As required: |
|||
* Backslashes are uniformly duplicated. |
* Backslashes are uniformly duplicated. |
||
* Until recently gojq did not handle NUL (#x0) properly. |
* Until recently gojq did not handle NUL (#x0) properly. |