Newbies teeloo Posted July 25, 2002 Newbies Posted July 25, 2002 How can I parse the following data format that
falkaholic Posted July 25, 2002 Posted July 25, 2002 Try something like this: Middle( theField, Position(theField, "Name: ", 0,1), Position(theField, "<return charactor>",0,1)) that *should* work, and just repeat for the others.
trevorg Posted July 25, 2002 Posted July 25, 2002 That is close to correct. Here is what I made. It doesn't include the field names when parsing the data. I only created it for Name: and Address:, but the rest could be modified easily. Hope this helps! Definitely look up the Position function, and the Middle function. Parse.zip
Newbies teeloo Posted July 26, 2002 Author Newbies Posted July 26, 2002 Amazing! This works, but I am having trouble making the other scripts work for the other lines of data. Which parameters need to be changed, and to what values?
trevorg Posted July 27, 2002 Posted July 27, 2002 Feeling generous... Here is the finished file. Parse(Complete).zip
Newbies teeloo Posted July 29, 2002 Author Newbies Posted July 29, 2002 Thanks Trevorg, I do appreciate you completing the file for me, but i still would like to know HOW this parameters are affecting things. I am somewhat unclear as to how you are incorporating the Middle and the 2 Position functions together. Learning this would greatly help me in my neverending quest for knowledge -) Give a man a fish and he'll eat it for a day -- teach a man to fish and he'll feed a town forever.
trevorg Posted July 29, 2002 Posted July 29, 2002 I'll try my best to explain how it works. First we need to understand the commands: [color:"red"]Middle(text, start, size) Parameters text - any text expression or text field start - any numeric expression or field containing a number size - any numeric expression or field containing a number [color:"green"]Position(text, search string, start, occurrence) Parameters text - any text expression or text field search string - any text expression or text field representing the set of characters you want to find start - any numeric expression or field containing a number, representing the number of characters from the start of the text string at which to begin the search occurrence - any numeric expression or field containing a number. (A negative occurrence value causes the scan to go in the opposite direction from start. A zero value for occurrence is invalid and returns a result of zero.) Lets take one of the Set Field Commands and break it down. This one is to set the City field. Middle(TextChunk, Position( TextChunk, "
Recommended Posts
This topic is 8154 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now