C1Awk Reference > C1Awk Properties > MatchQuotes Property |
Returns or sets whether quote-delimited strings are processed as single fields.
[form!]C1Awk.MatchQuotes[ = {True | False} ]
This feature was added to facilitate parsing of quote and comma-delimited files such as those exported by most database and spreadsheet programs.
Double or single quotes are both recognized, but one does not match the other. Unmatched quotes in a line are ignored. If you want the Awk to automatically remove the quotes, set the FilterQuotes property to True.
For example:
Example Title |
Copy Code
|
---|---|
awk = "'John Doe', 24, '1244 Main Street', 645-5432" awk.FS = ", " awk.MatchQuotes = False debug.print awk.NF, awk.F(1) 7 'John awk.MatchQuotes = True debug.print awk.NF, awk.F(1) 4 'John Doe' awk.MatchQuotes = True awk.FilterQuotes = True debug.print awk.NF, awk.F(1) 4 John Doe |
Boolean
False