There are tags for autoit scripts that make them look nice. You should try them
Instead of getting the text, writing it to the file, and then opening the file and looking for the text, why not just read the text before you write it?
Local $sText = ControlGetText("SELLING PLATFORM", "", "[CLASS:RichEdit20A;INSTANCE:1]");copy command output and put in var $stext
If Stringinstr($sText, "whateveritwasyou'relookingfor") then msgbox(0, "", "Found")
Local $sFile = FileOpen(@ScriptDir & "\TempFile.txt", 2);create text file at script dir and call tempfile
FileWrite($sFILE , $sText);write output to this txt file""'
would not this work?
StringRegExpReplace($new_items[$i][0],"([1-9]{1,2})(0*)(\d{2,4})","$1-$3")
changed the third one to d{2,4} because you want at least two digits?
Also, http://gskinner.com/RegExr/. Save it, bookmark it, love it. It's like the SciTE of regex