String parsing/stripping code
Add a buffer length parameter and then use strncpy to avoid overflow.
Your testing code hides the usage of the function. It's clearer to put it on a separate line:

for(i = 0; i &lt; sz; ++i) {
    parse_string(input[i], buf)
    printf("Test string \"%s\" =&gt; \"%s\", %s\n", 
                 input[i], output[i], strcmp(output[i], buf) == 0 ? "passed" : "failed");
}

You missed the out of order cases like &gt;123&lt;