NetworkGhost
IS-IT--Management
Hello All,
After getting some great help from the forum I tried going a little further and am running into another issue.
Here is my code:
set html {<a href="
regexp {\?.*\-\b} $html match match
puts $match
What I want to happen is to grab this part:
?Auto:LogOffR=TRUE-
So I'll break down my regex understanding an maybe someone can clear me up.
\?.*-\b
\? - Match the first instance of the question mark
.* - Capture all text after the question mark
-\b - Stop at the dash "-"
I ran it in Expresso and got the following result:
?Auto:LogOffR=TRUE-10-10
In a expect Script I get :
can't read "match": no such variable
while executing
"puts $match"
(file "./test.sh" line 6)
So basically Im up the creek. Im still trying stuff but would appreciate assistance.
Free Firewall/Network/Systems Support-
After getting some great help from the forum I tried going a little further and am running into another issue.
Here is my code:
set html {<a href="
regexp {\?.*\-\b} $html match match
puts $match
What I want to happen is to grab this part:
?Auto:LogOffR=TRUE-
So I'll break down my regex understanding an maybe someone can clear me up.
\?.*-\b
\? - Match the first instance of the question mark
.* - Capture all text after the question mark
-\b - Stop at the dash "-"
I ran it in Expresso and got the following result:
?Auto:LogOffR=TRUE-10-10
In a expect Script I get :
can't read "match": no such variable
while executing
"puts $match"
(file "./test.sh" line 6)
So basically Im up the creek. Im still trying stuff but would appreciate assistance.
Free Firewall/Network/Systems Support-