AutoHotkey Community

It is currently May 27th, 2012, 4:29 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: RegExMatch
PostPosted: February 27th, 2010, 2:15 am 
Hi,
I was wondering if someone could tell me how to reference a variable
inside a regexmatch pattern ?
Such as :

Code:
regexmatch(a_loopfield,"U)href=""/%VARIABLE%/../(.*)\.html",adn)


Thank you.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: February 27th, 2010, 3:55 am 
Offline

Joined: December 21st, 2008, 7:29 pm
Posts: 181
Code:
str      = Hello
needle   = Goodbye\s%str%\sGoodbye
haystack = Goodbye Hello Goodbye

If RegExMatch(haystack, needle)
   Msgbox Match!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 27th, 2010, 5:54 am 
Offline
User avatar

Joined: March 19th, 2008, 12:43 am
Posts: 5480
Location: the tunnel(?=light)
Another option:

Code:
RegExMatch(A_LoopField,"U)href=""/" VARIABLE "/../(.*)\.html",adn)

_________________
Image
Try Quick Search for Autohotkey or see the tutorial for newbies.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 27th, 2010, 7:28 am 
sinkfaze wrote:
Another option:

Code:
RegExMatch(A_LoopField,"U)href=""/" VARIABLE "/../(.*)\.html",adn)


Perfect :P
Thanks.


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

All times are UTC [ DST ]


Who is online

Users browsing this forum: Bing [Bot], Mickers, rbrtryn and 67 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