parsing reply from inetc
Hi, I trying to use inetc to register to establish a connection to a server, register some details and obtain the the confirmed registration details from the post_reply.
For example, connect with
inetc::post $registrationStr ${REGISTER_CMD} "post_reply.html"
...get this post_reply back...
<html>
<title>Process Registration</title>
<body>
<p>REG_ID=1020</p>
<p>REG_DATE=20070215</p>
</body>
</html>
I was looking for a function that would allow me to pass a key and a seperator in, strip off any unnecessary characters and retrun the key value - say something like:
push "REG_ID" ; the string to look for
push "=" ; the key seperator
call getKeyValue ; answer is "1020"
That way I may also be able to use the same func to parse something like:
<html>
<title>Process Registration</title>
<body>
<p>REG_ID=1020 REG_DATE=20070215</p>
</body>
</html>
Does anyone know if something like this is available?
Thanks.