Optional field dilemma any ideas?

Get help with installation and running here.

Moderators: DataMystic Support, Moderators

danieluub
Posts: 1
Joined: Fri Oct 28, 2005 11:25 am
Location: Data Analyst

Optional field dilemma any ideas?

Postby danieluub » Tue Nov 08, 2005 2:00 pm

Can have up to 10 optional fields in the data I am mining. But I think I need to create lines which are blank with a line number to get the optional delimiter to work.

Example:

00001 CLIVE PEETERS LIMITED CPR
00002 www.clivepeeters.com.au/
00003 289-311 Bayswater Road
00004 BAYSWATER NORTH
00005 VICTORIA
00006 3153
00007 (03) 9721 8400


['00001', capture( 1+ linechar ), cr, lf,
optional('00002 ', capture( 1+ linechar ), cr, lf, )
optional('00003 ', capture( 1+ linechar ), cr, lf, )
optional('00004 ', capture( 1+ linechar ), cr, lf, )
optional('00005 ', capture( 1+ linechar ), cr, lf, )
'00006', capture( 1+ linechar ), cr, lf]

$1,$2,$3,$4,$5,$6

Any ideas on how to best do this to create multiple optional fields within the one file??

User avatar
DataMystic Support
Site Admin
Posts: 2136
Joined: Mon Jun 30, 2003 12:32 pm
Location: Melbourne, Australia
Contact:

Postby DataMystic Support » Tue Nov 08, 2005 10:43 pm

Use 'longest optional' instead of just 'optional'
Regards,

Simon Carter, http://DataMystic.com/forums/index.php
http://PredictBGL.com - Insulin dose calculator for Type 1 diabetes
http://DownloadPipe.com - 250,000 free software downloads
http://DetachPipe.com - send huge email attachments


Return to “TextPipe Tips and Tricks, Questions and Support”

Who is online

Users browsing this forum: Baidu [Spider] and 1 guest