mladost1 Posted May 24, 2008 Share Posted May 24, 2008 I was wondering when i use String to find a certain word if I could find out which line this word was found on. Simple as that. Thanks Link to comment Share on other sites More sharing options...
Paulie Posted May 24, 2008 Share Posted May 24, 2008 When you use String? You mean StringInStr() ?? #Include <file.au3> $StringToSearchFor = "Monkey" $FilePath = @DesktopDir&"\Test.txt" Dim $Array _FileReadToArray($FilePath, $Array) For $i = 1 to $Array[0] If StringInStr($Array[$i], $StringToSearchFor) then Return $i EndIf Next Link to comment Share on other sites More sharing options...
mladost1 Posted May 24, 2008 Author Share Posted May 24, 2008 I meant StringRegExp Your script works fine thanks a lot 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