Line: 1 to 1 | ||||||||
---|---|---|---|---|---|---|---|---|
.TEXT PARSE LINE | ||||||||
Line: 20 to 20 | ||||||||
<text_to_parse> contains the text you want parsed (Required). | ||||||||
Changed: | ||||||||
< < | <delimiter> is the single character to use as a field delimiter (Optional). If not PASSed, it will default to a Tab character. | |||||||
> > | <delimiter> is the single character to use as a field delimiter (Optional). If not PASSed, it will default to a Tab character. If you need to use a space as a delimiter, pass an underscore character ("_"). In this case the routine will see any trailing blanks as additional fields so the <no_of_fields> count will be wrong and --- .TEXT PARSE RESULT will contain 'Max Occur Exceeded'. | |||||||
<no_of_fields> returns the number of fields that were found in <text_to_parse> (Optional). This must be PASSed with Share "Y" to return a value. | ||||||||
Line: 29 to 29 | ||||||||
Read what other users have said about this page or add your own comments. | ||||||||
Deleted: | ||||||||
< < | ||||||||
Note that this excellent and powerful subroutine does not differentiate between delimiter characters within quotation marks and those that are actual delimiters. So if you have a CSV file with text fields that include commas, the results will not be what you expect. | ||||||||
Changed: | ||||||||
< < | One work-around would be to read through the string beforehand, keep track of when you're within quotes and when you're not, and change the actual delimiters from commas to tabs, since tabs are rarely found within field content. Of course, you could use some other character as well, but I found that tabs did the trick. | |||||||
> > | One work-around would be to read through the string beforehand, keep track of when you're within quotes and when you're not, and change the actual delimiters from commas to tabs, since tabs are rarely found within field content. Of course, you could use some other character as well, but I found that tabs did the trick. | |||||||
-- AlKalter - 2012-06-12 |