Parsing text

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to parse the following text to pull out the course info, which is
to the right of "below:" within the text. We can say the text value is
assigned to a variable called CourseInfo. There is always at least 1 space
between "below:" and the begninning of the course info, so I might need to
use Trim to drop the spaces.

"Please rate yourself based on the class listed below: PLN0010: Sales
Orders"

Much thanks,
Clint
 
I'm trying to parse the following text to pull out the course info, which is
to the right of "below:" within the text. We can say the text value is
assigned to a variable called CourseInfo. There is always at least 1 space
between "below:" and the begninning of the course info, so I might need to
use Trim to drop the spaces.

"Please rate yourself based on the class listed below: PLN0010: Sales
Orders"

Much thanks,
Clint

So if I understand you correctly, from the sentence below, you wish to
return
"PLN0010: Sales Orders"

SomeVariable = Trim(Mid(SomeText,InStr(SomeText,"below:")+7))
 
Perfect! Thanks.


fredg said:
So if I understand you correctly, from the sentence below, you wish to
return
"PLN0010: Sales Orders"

SomeVariable = Trim(Mid(SomeText,InStr(SomeText,"below:")+7))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top