[DFDL-WG] how to trim inside of escape block?

Mike Beckerle mbeckerle.dfdl at gmail.com
Tue Nov 21 20:17:05 EST 2017


I have a CSV file

Some lines look like this

a,b,"   started with spaces, appearing right after the escape block start
",c,d,e

I reviewed the spec, and I see that pad characters appear outside of the
quotation marks (escape block start/end).

What I'm trying to do is remove the whitespace after the escape block
start, and before the escape block end. This is just spurious whitespace,
appears because some of these CSV files were edited by people.

In my data the quoting characters are not always present. They are only
there if a comma appears in the data string.

Is there a technique for getting rid of the leading/trailing whitespace
inside the escape block start/end that I have forgotten?

...mikeb

Mike Beckerle | OGF DFDL Workgroup Co-Chair | Tresys Technology |
www.tresys.com
Please note: Contributions to the DFDL Workgroup's email discussions are
subject to the OGF Intellectual Property Policy
<http://www.ogf.org/About/abt_policies.php>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ogf.org/pipermail/dfdl-wg/attachments/20171121/56528634/attachment.html>


More information about the dfdl-wg mailing list