Kinook Software Forum

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

Reply
 
Thread Tools Rate Thread Display Modes
  #1  
Old 01-25-2007, 01:32 AM
jsherwood jsherwood is online now
Registered User
 
Join Date: 01-24-2007
Posts: 2
Angry Replacing A Line

I'm trying to figure out how to replace a line in a resource file.
I have a line like:
VALUE "SpecialBuild", "1/24/2007 - 12:02:02 PM"

I want to replace the date and time part with the current date and time. The problem is the date and time currently there will be different on each build.

I'm doing a find on VALUE "SpecialBuild", and I don't really care about the rest of it. But I don't know how to do that.
Reply With Quote
  #2  
Old 01-25-2007, 08:09 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
See attached sample.
Attached Files
File Type: bld replspecialbld.bld (939 Bytes, 2059 views)
Reply With Quote
  #3  
Old 01-25-2007, 09:32 AM
jsherwood jsherwood is online now
Registered User
 
Join Date: 01-24-2007
Posts: 2
Wink

Thanks for the quick response, that worked great.

Could you please explain the regular expression line that you are using here? What does this tell me?
(VALUE\s*"SpecialBuild"\s*,\s*")[[^"]]+"

Then the replacement line
($1)[vbld_FormatDateEx(Now, "m/d/yyyy - H:MM:SS AP")]"

Thanks
Joe
Reply With Quote
  #4  
Old 01-25-2007, 09:36 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
http://www.visualbuild.com/Manual/regex.htm
http://www.visualbuild.com/Manual/scriptexpressions.htm
http://www.visualbuild.com/Manual/sysscriptdatetime.htm
Reply With Quote
  #5  
Old 07-09-2007, 11:06 PM
pyang pyang is online now
Registered User
 
Join Date: 12-23-2003
Posts: 33
Unhappy

I'm not an expert in Regular expression could you advice how i can replace a text eg. Testing 1234 with Testing 5678

The 1234 will change so i cannot fix the value.

Please advice.

Thanks,
angpy
Reply With Quote
  #6  
Old 07-10-2007, 10:31 PM
pyang pyang is online now
Registered User
 
Join Date: 12-23-2003
Posts: 33
got it resolved.

All i need is Testing [[^*]] and $1Testing 5678
Reply With Quote
  #7  
Old 07-15-2007, 10:42 PM
pyang pyang is online now
Registered User
 
Join Date: 12-23-2003
Posts: 33
Huh... somehow some of my content is being removed.

I have Test1 and Test2 being removed after i did a regular expression Testing 1234 to Testing 5678.

Any idea?
Reply With Quote
  #8  
Old 07-17-2007, 10:18 AM
kinook kinook is online now
Administrator
 
Join Date: 03-06-2001
Location: Colorado
Posts: 6,034
Please ZIP and send or post:
1) The info from Help | About | Install Info
2) The .bld file
3) The file being searched/replaced

Thanks.
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 09:20 PM.


Copyright © 1999-2023 Kinook Software, Inc.