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)
-   -   Problems with "Replace In File" (https://www.kinook.com/Forum/showthread.php?t=472)

a_t_jackson 06-15-2004 09:23 AM

Problems with "Replace In File"
 
I have C# web service project called MyService.csproj. In MyService.asmx.cs I have a description field:

[WebService(Description="My Web Service")]

I want to change this field to include a version number before I compile the solution that contains the project so it will look something like this:

[WebService(Description="My Web Service v1.0")]

I'm completely new to regular expressions and have tried unsuccessfully to use them in "Replace In File" without success.

Expression to find:
[[WebService(Description="My Web Service ?")]]

Replace matches with:
[[WebService(Description="My Web Service %FILE_VERSION%")]]

This doesn't work. Any ideas?

kinook 06-15-2004 10:50 AM

Here are a couple ways:

Find:
(\[[WebService\(Description="My Web Service)[[^\n"]]*("\)\]])

Replace with:
$1 %FILE_VERSION%$2

or

Find:
\[[WebService\(Description="My Web Service[[^\n"]]*"\)\]]

Replace with:
[[WebService\(Description="My Web Service %FILE_VERSION%"\)]]

See the references in the Replace in File help topic for more help on regular expression syntax.

a_t_jackson 06-22-2004 08:59 AM

perfect - many thanks


All times are GMT -5. The time now is 08:27 PM.


Copyright © 1999-2023 Kinook Software, Inc.