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)
-   -   Replacing A Line (https://www.kinook.com/Forum/showthread.php?t=2251)

jsherwood 01-25-2007 12:32 AM

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.

kinook 01-25-2007 07:09 AM

1 Attachment(s)
See attached sample.

jsherwood 01-25-2007 08:32 AM

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

kinook 01-25-2007 08:36 AM

http://www.visualbuild.com/Manual/regex.htm
http://www.visualbuild.com/Manual/scriptexpressions.htm
http://www.visualbuild.com/Manual/sysscriptdatetime.htm

pyang 07-09-2007 11:06 PM

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

pyang 07-10-2007 10:31 PM

got it resolved.

All i need is Testing [[^*]] and $1Testing 5678

pyang 07-15-2007 10:42 PM

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?

kinook 07-17-2007 10:18 AM

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.


All times are GMT -5. The time now is 04:46 PM.


Copyright © 1999-2023 Kinook Software, Inc.