Search the Community
Showing results for tags 'string regular expression'.
i am trying to get number from string using this code : #include <IE.au3> $oIE = _IEAttach ("Edu.corner") Local $aName = "Student name & Code:", $iaName = "0" Local $oTds = _IETagNameGetCollection($oIE, "td") For $oTd In $oTds If $oTd.InnerText = $aName Then $iaName = $oTd.NextElementSibling.InnerText $iGet = StringRegExpReplace($iaName, "\D", "") EndIf Next MsgBox(0, "", $iGet) it was get number like 52503058 But, I want to get only student code 5250. (Different student have
Hi Programmers, I have worked with SRE before and I know it's a really powerful tool to get extract exactly what you want from text. However it's a little tricky to use sometimes with a lot of syntax to memorize. I'm having a problem and I know it should work, but I just can't get it to work. Here is my text: :ALONEI~2 cd ALONEI~2 AITD2CRK.COM goto end :ALONEI~3 cd ALONEI~3 AITD3.EXE goto end :ARKANO~1 cd ARKANO~1 start.bat goto end :Ascend cd Ascend ASCEND.EXE goto end What I would like to do is get the text between a label like "Alonel~3" and the line "goto end" below it. Her