Comma quibbling: Difference between revisions
Content deleted Content added
sed |
|||
Line 3,271: | Line 3,271: | ||
{ABC, DEF, G and H} |
{ABC, DEF, G and H} |
||
</pre> |
</pre> |
||
=={{header|Sed}}== |
|||
script-file: |
|||
<lang sed>s/#.*$//g |
|||
y/[/{/ |
|||
y/]/}/ |
|||
s/"//g |
|||
s/ [A-Z][A-Z]*}/ and&/g |
|||
s/, and/ and/</lang> |
|||
test.txt: |
|||
<lang text>[] # (No input words). |
|||
["ABC"] |
|||
["ABC", "DEF"] |
|||
["ABC", "DEF", "G", "H"]</lang> |
|||
sed -f script-file test.txt |
|||
{{out}} |
|||
<pre>{} |
|||
{ABC} |
|||
{ABC and DEF} |
|||
{ABC, DEF, G and H}</pre> |
|||
=={{header|Seed7}}== |
=={{header|Seed7}}== |