So.....I was searching the forum and came upon this here script that was posted by Bob Hansen.
Code: Select all
Let>vNeedle=^.*IGNORE.*"([^"]*)".*(\b(PRESS|ENTER|TYPE)\b.*)WITHIN(.*)$
Let>vHaystack=IGNORE "Error !*Child" TYPE <F1> WITHIN 2
Let>vReplacement=Four Values are:%CRLF%1: $1%CRLF%2: $2%CRLF%3: $3%CRLF%4: $4
RegEx>%vNeedle%,%vHaystack%,0,MatchMe,cnt,1,%vReplacement%,vResult
MessageModal>%vResult%
The arguement is vNeedle. So this is my understanding of that.
Let>vNeedle=^.*IGNORE.*"([^"]*)".*(\b(PRESS|ENTER|TYPE)\b.*)WITHIN(.*)$
The carot is the beginning of the text being analyzed. The .* means everything before the word IGNORE and again, everything after.
The next part is "([^"]*)". The first quote I think means -up to the qoute- And then ([^"]*). Which argues not to include from the beginning to the quote. But to include everything else.(That's the *) So that result would be in $1. The next part argues from the second quote and everything else to find a word boundary. It's looking for three words - PRESS,ENTER, OR TYPE. So that would be $2. The next .* means and everything else.
Here is where I think I may be wrong. Why does $3 equal TYPE? Is it because it searches for word boundary + .* and then just for the word boundary?
The next part is WITHIN. Which I believe means -up to the word WITHIN-. And the last part means everything else. Which is 2.($4)
The $ marks the end of the string.
So how'd I do? Can anyone explain what I got right and what I got wrong?
Thanks for helping,
PepsiHog