AutoHotkey Community

It is currently May 27th, 2012, 11:07 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: January 6th, 2012, 3:43 pm 
Offline

Joined: June 19th, 2007, 12:04 am
Posts: 174
I'm able to find:
testing string

I am not able to find:
testing [bunch of spaces here] string

How can I take and cut out the whitespace to find what I'm looking for?

Code:
   
FileRead, Contents, file.txt
   IfNotInString, Contents, testing string
   {
      
      MsgBox, Not Found
      Continue
   }
   Else
   {
      MsgBox, Found!
      Continue
   }


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 6th, 2012, 3:51 pm 
Offline

Joined: August 7th, 2011, 1:23 pm
Posts: 754
Code:
if regexmatch(contents, "testing\s+string")
   msgbox found !!!
else
   msgbox Not found !!!

_________________
Win7 - Firefox 10.0.2 - AHK_L 1.1.07.00
Please bear with me and my English which is so bad at times that even I don't understand myself


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: January 6th, 2012, 3:52 pm 
Look at "RegExMatch".The help file is your friend.


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, Edd, Exabot [Bot], Google [Bot], Google Feedfetcher, HotkeyStick and 12 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group