Finding & Replacing Characters using wildcards

G

Greg

Hi,

I am trying to use the Find/Replace wildcard syntax and add Heading 1
styles to my text. I have turned For example I have the following
sample text in my document:

MyHead1AnthropologyHead1My
MyHead1Cell BiologyHead1My
MyHead1Center for Neuroscience and Regeneration ResearchHead1My

It is my understanding that I need to use the following in the "Find
What" box:

(MyHead1*Head1My^13)

And use the following in the "Replace With" box:

\1^p ((style "Heading 1"))

However, it doesn't apply the "Heading 1" style format instead I get:

MyHead1Anatomical PathologyHead1My

((style "Heading 1"))

Can someone explain what I need to fix to accomplish what I need?
Thanks in advance for any help you can offer.

-Greg
 
G

Greg Maxey

You only need:
MyHead1*^13
in Find what
and:
^&
in Replace with.

With the cursor in the replace with field:
Click More and in the Search options pane click format>Style>Heading1
 
G

Greg

Hi,

Thanks Jay & Greg for your prompt replies. I used Jay's version and it
is now working. And as Jay thought, I did want to remove the prefix
(MyHead1) and suffix (Head1My) tags from the final results.

-Greg
 
G

Greg Maxey

Greg,

Glad your issue is resolved. After reading Jay's reply I figures he
deduced your actual intent. I on the other hand tend to just "anwer
the question." Must be conditioning from my regular job ;-)
 
G

Greg

Hi,

Opps, I should mention I modifed my "Find What" syntax to:

(MyHead1)(*)(Head1My^13)

And "Replace With" syntax to:

\2^p

This got me what I wanted!

Thanks again,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top