Hello again,
My Friend has told me to do like this. And it works as I need.
Sample:
set str "activate%NAME%batch%5050%CANCEL%TYPE=TRUE;"
puts $str
if {[regexp "(.*)%(.*)%(.*)%(.*)%(.*)%(.*)" $str all a b c d e f ]} {
puts "$e:$f"
}
OUTPUT...
Thank you.
But, how about if the "%GH%%TYPE=TRUE;" is change to another words. By example:
activate%NAME%batch%5051%CANCEL%RIGHT=TRUE;
or
activate%NAME%batch%5051%PLEASE%RIGHT=TRUE;
How do I wite on my programme?
Hello,
I have a question on regexp & regsub.Actually, I have read the tutorial on internet about regexp & regsub.But I still can't understand how to apply this code.
I just want to take only sub string from the string.Example:
Input:
activate%NAME%batch%5050%GH%TYPE=TRUE;
Output...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.