I have some problems getting a GREP match working in a tcp-script.
Here's the script:
STOR "Version" "n/a"
STOR "Uptime" "n/a"
CONN #60
WAIT #30 @IDLE (idle timeout in secs)
DISC @DISCONNECT (disconnect handler)
SEND "GET ${URL Path} HTTP/1.0\r\n"
SEND "User-Agent: InterMapper/${_VERSION}\r\n"
CHCK "${User ID}${Password}" else goto #+2
SEND "Authorization: Basic ${_BASE64:${User ID}:${Password}}\r\n"
SEND "\r\n"
MTCH "HTTP/"i else goto @UNEXPECTED_GREETING
MTCH "200" else goto @BAD_GET_RESPONSE
DISC if disconnected goto @NO_MATCH
LINE OFF
EXPT "${String to verify}"i else goto @NO_MATCH
MTCH m"([0-9]\.[0-9]+)"i else goto #+2
STOR "Version" "${1}"
MTCH m"[0-9]\sdays,\s.*" else goto #+2
STOR "Uptime" "${1}"
DONE OKAYThe text returns by the TCP Script looks like this:
"version 1.30#uptime 0 days, 18:05:51" (without the quote-marks)
I'm able to match the first part, but not the last.
The GREP code works in BBEdit (7.04) and according to BBEdit's grep reference, it should be ok.
Since LINE is OFF, I expect the script to work on the complete data returned, and the 500 char buffer size should also not be broken. So,
1: Is it not possible to do several GREP matches in the same buffer?' (If NO, could we have this added, please?)
2: Is there something wrong in the script?
TIA,
____________________________________________ Jakob Peterh�nsel Technical Engineer Tel: +45 7022 1014 Fax: +45 7022 1013 Mob: +45�22 68 49 61 [EMAIL PROTECTED] www.NetPoint.com
<<inline: image.tiff>>
The information contained in this message is confidential or protected by law.
If you are not the intended recipient, please contact the sender and delete this message. Any unauthorised copying of this message or unauthorised distribution of the information contained herein is prohibited.
