Here's a basic calculation that will extract a single value:
let ( [
data = "Co-op Number:284 Customer Number:10xx68 Co-op Grant Used:125.00 Request Date:1/20/2014 Company :COMPANY NAME Contact:CONTACT NAME Address1:123 MAIN ST Address2: City:ANYWHERE State / Region:TX Country :United States Postal Code:77060 Telephone:123-456-1234 " ;
curField = "Co-op Number" ;
nextfield = "Customer Number" ;
startPos = Position ( data ; curField ; 1 ; 1 ) + length ( curField ) + 1 ;
endPos = Position ( data ; nextField ; 1 ; 1 ) ;
curVal = Trim ( Middle ( data ; startPos ; endPos - startPos ))
In order to make this work, what you'll need to do is create a return delimited list of all your fields, like this:
Co-op Grant Used
State / Region
Then you can loop over the list where you set curField to GetValue ( list ; count ) and nextField to GetValue ( list ; count + 1 ). You'll need to modify the endPos value for when you hit the end of the loop (i.e., when the nextField value is empty) so that your endPos is just equal to Length ( data ). But this should get you started.
Thank you Mike! I was able to use that and not delimit in any way for my use! I really appriciate your help!