Pls. Help: Search & Replace with wildcarts and re-formatting

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Ladies / Gentleman

I am facing a hard issue with replacing soe dashes in front and after
multiple textpassages:
=========
Sample:
-anyword anyword anyword- plaintext)

should become:
anyword anyword anyword (re-formatted as style:H2 an NO "-" anymore
=========
Problem I got MANY passages within the document with other text before and
after
So how can reach that?

Any Idea?
 
Hi Frank,

The hyphens are always at the beginning and end of the paragraph?

¶
-anyword anyword anyword-¶
....¶

You can try Edit>Find, "Match wildcards":
Find what: (^13)\-([!^13]@)\-(^13)
Replace with: \1\2\3 ((and Format > Style > Heading 2))

The should only match those paras startng and ending with a hyphen.
Using [!^13]@ instead of the *-wildcard makes sure that the match stays
limited to one paragraph.
The "Replace with" re-inserts all the stuff except the hyphens (which are
not in any of the bracketed expressions).

Regards,
Klaus
 
Many Thanks

but this doe not work soooo well:
The original text:
==============================
-Building an Excel Invoice Application Using Visual Studio Tools for Office,
Version 2005
http://msdn.microsoft.com/office/de...5_ta/html/OfficeVSTOBuildingExcelInvoices.asp

Read this article for a demonstration of an Excel invoice solution written
in Visual C# using Visual Studio Tools for the Microsoft Office System,
Version 2005 Beta 1, and Visual Studio, Version 2005 Beta 1.
-Deploying Office Live Communications Server 2005 at Microsoft
http://www.microsoft.com/downloads/details.aspx?familyid=61e90c28-3840-4c89-9b19-2814a6a62aaf

Detailed overview of how Microsoft IT deployed and manages Microsoft Office
Live Communications Server 2005 to provide its employees with a real-time
communications and instant messaging solution.

==============================
the chpter after the hyperling also gets formatted with H2 style.
Any idea how to avoid this?

My Dream would be having it like this:
==============================
<H2>Building an Excel Invoice Application Using Visual Studio Tools for
Office, Version 2005</H2>
<empty line>
<hyperlink
http://msdn.microsoft.com/office/de...5_ta/html/OfficeVSTOBuildingExcelInvoices.asp</hyperlink>
<empty line>
<normal>
Read this article for a demonstration of an Excel invoice solution written
in Visual C# using Visual Studio Tools for the Microsoft Office System,
Version 2005 Beta 1, and Visual Studio, Version 2005 Beta 1.
</normal>
<empty line>
<empty line>
<H2>Deploying Office Live Communications Server 2005 at Microsoft</H2>
....
==============================
any idea?
 
Many Thanks

but this doe not work soooo well:
The original text:
==============================
-Building an Excel Invoice Application Using Visual Studio Tools for Office,
Version 2005
http://msdn.microsoft.com/office/de...5_ta/html/OfficeVSTOBuildingExcelInvoices.asp

Read this article for a demonstration of an Excel invoice solution written
in Visual C# using Visual Studio Tools for the Microsoft Office System,
Version 2005 Beta 1, and Visual Studio, Version 2005 Beta 1.
-Deploying Office Live Communications Server 2005 at Microsoft
http://www.microsoft.com/downloads/details.aspx?familyid=61e90c28-3840-4c89-9b19-2814a6a62aaf

Detailed overview of how Microsoft IT deployed and manages Microsoft Office
Live Communications Server 2005 to provide its employees with a real-time
communications and instant messaging solution.

==============================
the chpter after the hyperling also gets formatted with H2 style.
Any idea how to avoid this?

My Dream would be having it like this:
==============================
<H2>Building an Excel Invoice Application Using Visual Studio Tools for
Office, Version 2005</H2>
<empty line>
<hyperlink
http://msdn.microsoft.com/office/de...5_ta/html/OfficeVSTOBuildingExcelInvoices.asp</hyperlink>
<empty line>
<normal>
Read this article for a demonstration of an Excel invoice solution written
in Visual C# using Visual Studio Tools for the Microsoft Office System,
Version 2005 Beta 1, and Visual Studio, Version 2005 Beta 1.
</normal>
<empty line>
<empty line>
<H2>Deploying Office Live Communications Server 2005 at Microsoft</H2>
....
==============================
any idea?
 
ok - now i understood the string...

MANY MANY MANY Thanks!!!

-([!^13]@)\-(^13) to search
replaced by \1\2 and format options
 
It works now? Great!!

Wasn't too sure where the ¶ marks are in your sample...

Regards,
Klaus
 
Back
Top