I need to take each instance of
^pTEXTLEADER varyingtext </P>^p<P>
and replace it with
^pTEXTLEADER varyingtext ^p
I can't simply find and replace
</P>^p<P>
with
^p
because
</P>^p<P>
occurs in many places in my file and I want to keep it in those other
places; I already tried this and it returns too many errors on my final
file.

I've looked at "LCase", "Left", "LTrim", "Trim", "Mid", "RCase", "Right",
and "RTrim"; none of these does what I need to do.

Help is greatly appreciated!!
SGC

Re: Wildcard Search Replace by Klaus

Klaus
Mon Jan 26 08:00:37 CST 2004

Hi SGC,

You probably know already that you need to use ^13 instead of ^p in wildcard
searches.

For the "varyingtext", you should use [!^13]@, so you don't match several
paragraphs.
This will match any text, as long as it doesn't contain paragraph marks.

The "<" and ">" have to be escaped ("\<", "\>), since they are wildcard
characters for word anchors.

So you'd get:
Find what: (^13TEXTLEADER[!^13]@)\</P\>^13\<P\>
Replace with: \1^p

Greetings,
Klaus


"SGC" <sgc@notarealaddress.com> wrote:
> I need to take each instance of
> ^pTEXTLEADER varyingtext </P>^p<P>
> and replace it with
> ^pTEXTLEADER varyingtext ^p
> I can't simply find and replace
> </P>^p<P>
> with
> ^p
> because
> </P>^p<P>
> occurs in many places in my file and I want to keep it in those other
> places; I already tried this and it returns too many errors on my final
> file.
>
> I've looked at "LCase", "Left", "LTrim", "Trim", "Mid", "RCase", "Right",
> and "RTrim"; none of these does what I need to do.
>
> Help is greatly appreciated!!
> SGC
>
>



Re: Wildcard Search Replace by Helmut

Helmut
Mon Jan 26 08:08:04 CST 2004

Hi,
is "^p" a paragraph mark?
Like =B6 ?
What does "</P>" stand for? and <P>?
Are you talking about a word document
or plain text or a string variable?
Greetings from Bavaria, Germany
Helmut Weber
"red.sys" & chr$(64) & "t-online.de"
Word XP, NT 4.0





Re: Wildcard Search Replace by SGC

SGC
Mon Jan 26 08:30:56 CST 2004

------
is "^p" a paragraph mark?
Like ¶ ?
------
YES

------
What does "</P>" stand for? and <P>?
------
These are the actual text, it's a xml file with all the tags ("</P>" and
"<P>" are just 2 of the tags, but they're used repeatedly)

------
Are you talking about a word document or plain text or a string variable?
------
It's a plain text document that I'm working on in word

Thank you,
SGC