Kinook Software Forum

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

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 04-16-2009, 03:31 PM
AVR AVR is online now
Registered User
 
Join Date: 04-16-2009
Posts: 4
Find and replace - regular expression

How do I find a line in a file to be replaced, based on the start of the line ?
I want to find the line that starts like [assembly: AssemblyVersion(" and then replace it as [assembly: AssemblyVersion("%val%)]

I have tried:

Find: ?^assembly: AssemblyVersion*
Replace: [[assembly: AssemblyVersion\("%val%"\)]]

Also tried a few more variations. The string does not seem to find a match to replace at all. What am I missing ?


P.S: I had posted the same content and got a notification for a reply. But I dont see my original post and the notification link seemed to be invalid. So, posting again.
Reply With Quote
  #2  
Old 04-16-2009, 03:40 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
You can use the Make VS.NET action to update the AssemblyVersion attribute in a source code file.
http://www.kinook.com/VisBuildPro/Ma...olutiontab.htm
http://www.kinook.com/VisBuildPro/Ma...ersionstab.htm
Reply With Quote
  #3  
Old 04-16-2009, 03:49 PM
AVR AVR is online now
Registered User
 
Join Date: 04-16-2009
Posts: 4
Thanks for the links.
While that works, I still need to be able to find a string based on the first few characters and replace it with something else.
Is there a way to use ^ or something else to pick up the entire line and replace it ?

Also, does VBP support setting the version field in the .ism file ?

Thanks in advance for the response.
Reply With Quote
  #4  
Old 04-16-2009, 04:10 PM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Quote:
Originally posted by AVR
Thanks for the links.
While that works, I still need to be able to find a string based on the first few characters and replace it with something else.
Is there a way to use ^ or something else to pick up the entire line and replace it ?
See attached sample.
http://www.kinook.com/VisBuildPro/Manual/regex.htm

Quote:
Also, does VBP support setting the version field in the .ism file ?
http://www.kinook.com/VisBuildPro/Ma...lshieldtab.htm

Attached Files
File Type: bld replace.bld (824 Bytes, 1557 views)
Reply With Quote
Reply


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 03:05 AM.


Copyright © 1999-2023 Kinook Software, Inc.