A small utility to parse files containing multi-word strings.
All you need is a C compiler and GNU make. Tested on MacOS, but should run on anything.
Edit the Makefile if you need to and then just run make install
. If you want to create
a Debian package, run: debuild -i -us -uc -b
A less practical one:
echo "'hi mom' {i can see} (my house) <from here!>" | msplit
hi mom"i can see"my house"from here!"
A practical one:
msplit /var/log/apache.log | cut -d\" -f6 | head -2
GET /SRID/FUNX/RBX/JSON HTTP/1.1
GET /SRID/FUNX/RBX/JSON HTTP/1.1
The following characters are considered opening and closing a quoted string:
start = "([{<`'\"";
close = ")]}>''\"";
- Make
matchsplit()
not destroy its input. - Stick
matchsplit()
in a library.
msplit
project by Cris van Pelt [email protected]
matchsplit()
code "borrowed" from Wessel Dankers.
Distributed under the terms of the MIT License (see the LICENSE file)