DoctorSLO Posted February 5, 2009 Posted February 5, 2009 (edited) Hi. Can someone help me to get this in StringRegExp ? I want to get this time 0:08:30 from this src="img/un/a/clock.gif" width=18> 0:08:30</TD> I do this $Time = StringRegExp('img/un/a/clock.gif" width=18> 0:08:30</TD>', 'img/un/a/clock.gif" width=18> ([0-9]{1,3}):([0-9]{1,2}):([0-9]{1,2})</TD>', 1) If @error == 0 Then $hTime = $Time[0] $mTime = $Time[1] $sTime = $Time[2] EndIf I know that this is incorrect ... please tell me how to do it correctly ... Thx EDIT: hTime are hours, mTime are minutes, sTime are sec. Edited February 5, 2009 by DoctorSLO
martin Posted February 5, 2009 Posted February 5, 2009 Hi. Can someone help me to get this in StringRegExp ? I want to get this time 0:08:30 from this src="img/un/a/clock.gif" width=18> 0:08:30</TD> I do this $Time = StringRegExp('img/un/a/clock.gif" width=18> 0:08:30</TD>', 'img/un/a/clock.gif" width=18> ([0-9]{1,3}):([0-9]{1,2}):([0-9]{1,2})</TD>', 1) If @error == 0 Then $hTime = $Time[0] $mTime = $Time[1] $sTime = $Time[2] EndIf I know that this is incorrect ... please tell me how to do it correctly ... Thx EDIT: hTime are hours, mTime are minutes, sTime are sec.This should work $Time = StringRegExp('img/un/a/clock.gif" width=18> 0:08:30</TD>', '[0-9]{1,2}:[0-9]{1,2}:[0-9]{1,2}', 1) If @error = 0 Then For $n = 0 To UBound($Time) - 1 ConsoleWrite("$TIme[" & $n & "] = " & $Time[$n] & @CRLF) Next EndIf Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now