Kinook Software Forums

Go Back   Kinook Software Forums > Visual Build Professional > [VBP] General Discussion

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 05-11-2007, 12:38 PM
draymond draymond is online now
Registered User
 
Join Date: 04-16-2007
Posts: 6
Replace in File w/ Macro Value

Text or regular expression to find:

<row><td>C:\Build Area\1.2.3.4</td><td>

Text or regular expression to replace matches with:

<row><td>C:\Build Area\1.2.3.5</td><td>

I would like to replace 1.2.3.4 will the macro of the build version. I am uncertain how to use macros with the "Text or regular expression to replace matches with". Thanks.

UPDATE:
Use Text or regular expression to replace matches with:
<row><td>C:\Build Area\%MACRO_NAME%</td><td>

RELATED PROBLEM:
But how do I select just a select group of characters to replace?
<row><td>C:\Build Area\REPLACEME</td><td>

This does not work for me.
^<row><td>C:\Build Area\\.*?</td><td>$

Last edited by draymond; 05-11-2007 at 01:36 PM.
Reply With Quote
  #2  
Old 05-11-2007, 02:28 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 5,758
See attached sample.
Attached Files
File Type: bld replace_ver.bld (873 Bytes, 666 views)
Reply With Quote
  #3  
Old 05-11-2007, 07:07 PM
draymond draymond is online now
Registered User
 
Join Date: 04-16-2007
Posts: 6
Expression to look for:
(?<=<row><td>C:\\Build Area\\)((\d|\.)+)(?=</td><td>$)

Replacement Match
%VER%

I do not understand how the VBP software knows what to replace. From my understanding it should replace the entire line that it was looking for. But it only replaces the "((\d|\.)+)" group.
Reply With Quote
  #4  
Old 05-11-2007, 07:36 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 5,758
http://www.regular-expressions.info/lookaround.html
Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

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 01:53 PM.


Copyright 1999-2019 Kinook Software, Inc.