Kinook Software Forum

Kinook Software Forum (https://www.kinook.com/Forum/index.php)
-   [VBP] General Discussion (https://www.kinook.com/Forum/forumdisplay.php?f=2)
-   -   Replace in File w/ Macro Value (https://www.kinook.com/Forum/showthread.php?t=2596)

draymond 05-11-2007 11:38 AM

Replace in File w/ Macro Value
 
Text or regular expression to find:

C:\Build Area\1.2.3.4

Text or regular expression to replace matches with:

C:\Build Area\1.2.3.5

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:
C:\Build Area\%MACRO_NAME%

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

This does not work for me.
^
C:\Build Area\\.*?$

kinook 05-11-2007 01:28 PM

1 Attachment(s)
See attached sample.

draymond 05-11-2007 06:07 PM

Expression to look for:
(?<=
C:\\Build Area\\)((\d|\.)+)(?=$)

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.

kinook 05-11-2007 06:36 PM

http://www.regular-expressions.info/lookaround.html


All times are GMT -5. The time now is 02:14 PM.


Copyright © 1999-2023 Kinook Software, Inc.