Noobster24 Posted June 29, 2007 Share Posted June 29, 2007 (edited) Hi,say I got this text:<TD CLASS="COL7G">text1</TD><TD CLASS="COL7G">text2</TD><TD CLASS="COL7G">text3</TD><TD CLASS="COL7">text4</TD><TD CLASS="COL7G">text5</TD>As you can see one is CLASS="COL7", the rest are COL7G.Well I got this function:Func _SRE_Between($s_FilePath, $s_Start, $s_End) $h_FRead = FileRead($s_FilePath, FileGetSize($s_FilePath)) $a_Array = StringRegExp($h_FRead, '(?:' & $s_Start & ')(.*?)(?:' & $s_End & ')', 3) If Not @error Then Return $a_Array EndFuncoÝ÷ ØkÊÚ zÛa{m{wõ¶X¤z×±·[^ÆÝ{wz×,¢gg¬¶«z+âû{-y§h} /±zYpéÈq©e¶ºw-åG+4ߧ8But it still gives me the good text (like text1, text2 etc.) + COL7G"> (I want to get rid of that COL7G">) Edited June 29, 2007 by Noobster24 Programs so far:Teh Serializer - Search for licenses for Nero - Windows - Office - Alcohol etc. Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted June 29, 2007 Moderators Share Posted June 29, 2007 (edited) I re-wrote that, look in the help file for _StringBetween(). But if you don't want COL7G then... $a_Array = StringRegExp($h_FRead, '(?s)(?i)CLASS="COL7">(.*?)\</TD', 3) Edit: After re-reading what you wrote, I can honestly say I have no idea what you want... If you want all COL7*wildcard any character">text then... $a_Array = StringRegExp($h_FRead, '(?s)(?i)CLASS="COL7.*?">(.*?)\</TD', 3) Will return all COL7* text. Edited June 29, 2007 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Noobster24 Posted June 29, 2007 Author Share Posted June 29, 2007 I re-wrote that, look in the help file for _StringBetween().But if you don't want COL7G then...$a_Array = StringRegExp($h_FRead, '(?s)(?i)CLASS="COL7">(.*?)\</TD', 3)Edit:After re-reading what you wrote, I can honestly say I have no idea what you want...If you want all COL7*wildcard any character">text then...$a_Array = StringRegExp($h_FRead, '(?s)(?i)CLASS="COL7.*?">(.*?)\</TD', 3)Will return all COL7* text.Hmm, I need to update my AutoIt I guess, cause in my helpfile no StringBetween functions exists Thanks for the help (again ) Programs so far:Teh Serializer - Search for licenses for Nero - Windows - Office - Alcohol etc. Link to comment Share on other sites More sharing options...
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