DCCD Posted June 6, 2009 Share Posted June 6, 2009 (edited) How to? Search for a string starting with "UBX" or "FLN" ends with @yahoo.com what am I missing here? ;#include <Constants.au3> ;#include <Pacap.au3> ;#include <plug.au3> $handle__ = FileOpenDialog('OpenScure', @WorkingDir & "\", "Pcap (*.cap;*.pcap;*.log)") $IniWrite = IniWrite("_config.ini", "SETUP", "key", $handle__) $IniRead = IniRead("_config.ini", "SETUP", "key", "") ; $handle_read = FileOpen($IniRead, 0) $SaveLog = FileOpen("Results.log", 1) ; If $handle_read <> -1 Then While 1 $string = FileReadLine($handle_read) If @error Then ExitLoop $pcap = StringRegExp($string, 'UBX|FLN| (.*?)@yahoo.com\z', 3) For $i = 0 To UBound($pcap) - 1 TrayTip("Results!", $pcap[$i], 15, 1) FileWrite($SaveLog, $pcap[$i] & @CRLF) Next WEnd FileClose($handle_read) FileClose($SaveLog) Else MsgBox(0, '', 'File open error') EndIf Edited June 6, 2009 by DCCD AndrewSchultz 1 [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group Link to comment Share on other sites More sharing options...
JackDinn Posted June 6, 2009 Share Posted June 6, 2009 (edited) have a try with this.$Sorted_String = StringRegExp($String, "(?:UBX|FLN)(.*?)@yahoo.com", 3)best place i'v found to learn Regular Expressions http://www.regular-expressions.info/tutorial.html Edited June 6, 2009 by JackDinn Thx all,Jack Dinn. JD's Auto Internet Speed Tester JD's Clip Catch (With Screen Shot Helper) Projects :- AutoIt - My projects My software never has bugs. It just develops random features. :-D Link to comment Share on other sites More sharing options...
DCCD Posted June 6, 2009 Author Share Posted June 6, 2009 have a try with this.$Sorted_String = StringRegExp($String, "(?:UBX|FLN)(.*?)@yahoo.com", 3)best place i'v found to learn Regular Expressions http://www.regular-expressions.info/tutorial.htmlExcellent! :D thanks a lot, [u][font=Arial Black]M[/font]y Blog, AVSS Parts[/u][font=Arial Black]Else[/font][font=Arial Black]L[/font]ibya Linux Users Group 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