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: Multiline (https://www.kinook.com/Forum/showthread.php?t=1561)

mweinberger 02-16-2006 11:51 AM

Replace in File: Multiline
 
Hi all,

I'm trying to replace a single line with multiple lines. If I press "Test", then all is fine, but as soon as I execute normally I consistantly get VBPro replacing my single line with nothing, effectively deleting the line. Here is some sample code.

==================
Source File To Operate On
==================




========================
Text or regular expression to find:
========================


====================================
Text or regular expression to replace matches with:
====================================
(?1

1
0
DateString


)

What do you think the problem is and how do I work around this issue?

Thanks in advance,

M. Weinberger

mweinberger 02-16-2006 12:19 PM

The solution that I figured out is:
 
Playing with VBPro, I discovered the solutions.

1. I have to use parenthesis around the find expressions, so:

()

2. I should use (for cleaner looking code) \r\n as new line characters in the replacement.

Hopefully this post helps somebody.

Me
ButterflyVista.com!


All times are GMT -5. The time now is 02:43 AM.


Copyright © 1999-2023 Kinook Software, Inc.