Kinook Software Forum

Go Back   Kinook Software Forum > Visual Build Professional > [VBP] General Discussion
FAQ Community Calendar Today's Posts Search

 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-27-2004, 04:14 PM
MHolmes MHolmes is online now
Registered User
 
Join Date: 09-27-2004
Location: Houston, TX
Posts: 6
Question Passing regex match to a script function

In a Replace Files step, I need to pass the result of a regex match. Basically, I need to match a filename in a file using the following regex:

Code:
^.*"OutputFilename"\s*=\s*"(.*)".*$
I capture the complete path specified, but I want to get JUST the filename part (so if it's C:\My Files\somefile.txt, I want somefile.txt) so that I can mutate the final output path at build time. I have a project level function called GetFileNamePart which uses the FSO to return the filename, but I can't call it as:

Code:
[GetFileNamePart($1)]
In the replace text. I know that regexp normally uses backreferences for that, but how can I get a match and pass it to a script function?
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



All times are GMT -5. The time now is 12:27 AM.


Copyright © 1999-2023 Kinook Software, Inc.