Help with parsing a text file
Posted: Wed Dec 15, 2004 10:04 pm
I am assuming RoboTask can do the following, but after reading the help and searching the forum, I am unable to see the answer.
I have a text file; actually an Email message from my mail server, but it is in ascii text format. I wish to have robotask look at the message one line at a time and pull out certain information for me and plug it into our database.
I have created a text loop and pointed to the file, then assign the current line to a variable, then I use an If Then statement to attempt to see if a certain string is contained within that line. My If/Then options do not seem to allow for this. If I say 'equal to' and compare it exactly to the string, then it will of course match.
A typical line in my message might look like this:
X-MDRemoteIP: 68.47.188.155
And I want to test to see if the line contains: "X-MDRemoteIP:", and if it does, then give me the value at the end of the line and assign it to a variable.
One other related question, in the If/Then comparison type options, I see equal to, not equal, equal or greater, etc. But what does the "In (occurrence)" option mean? I cannot see a reference to this in the documentation. Choosing that option does not seem to help with my above issue.
Thanks in advance for your assistance. I'm running version 2.1
I have a text file; actually an Email message from my mail server, but it is in ascii text format. I wish to have robotask look at the message one line at a time and pull out certain information for me and plug it into our database.
I have created a text loop and pointed to the file, then assign the current line to a variable, then I use an If Then statement to attempt to see if a certain string is contained within that line. My If/Then options do not seem to allow for this. If I say 'equal to' and compare it exactly to the string, then it will of course match.
A typical line in my message might look like this:
X-MDRemoteIP: 68.47.188.155
And I want to test to see if the line contains: "X-MDRemoteIP:", and if it does, then give me the value at the end of the line and assign it to a variable.
One other related question, in the If/Then comparison type options, I see equal to, not equal, equal or greater, etc. But what does the "In (occurrence)" option mean? I cannot see a reference to this in the documentation. Choosing that option does not seem to help with my above issue.
Thanks in advance for your assistance. I'm running version 2.1