Find *and replace* and wildcards

B

Brian

Hi all-

Was hoping to find a solution to the following.

Would like to find a set number of characters and add a
paragraph mark at the end of each set.

I was able to use wildcards with find; but not replace (to
advise Word *not* to replace the text, *only* to add the
paragraph mark.

Any ideas.

TIA
Regards,
Brian
 
G

Greg

Brian,

You need to identify your characters as a group and have
Word replace the group with itself and the paragraph mark

If I wanted to find the numerical groups in the example
below and replace them with identical groups and a
paragraph mark, I could use.

([0-9]{3}) in the find what field
and
\1^p in the replace with field.

"Now is the time 123 for all good men 456 to come to the
aid 789 of their country."
 
B

Brian

What a great trick. What can I substitute in the [0-9] to
reflect any character? I tried ? and * without success.
-----Original Message-----
Brian,

You need to identify your characters as a group and have
Word replace the group with itself and the paragraph mark

If I wanted to find the numerical groups in the example
below and replace them with identical groups and a
paragraph mark, I could use.

([0-9]{3}) in the find what field
and
\1^p in the replace with field.

"Now is the time 123 for all good men 456 to come to the
aid 789 of their country."

-----Original Message-----
Hi all-

Was hoping to find a solution to the following.

Would like to find a set number of characters and add a
paragraph mark at the end of each set.

I was able to use wildcards with find; but not replace (to
advise Word *not* to replace the text, *only* to add the
paragraph mark.

Any ideas.

TIA
Regards,
Brian

.
.
 
G

Greg

Brian,

Several ways. For example: <[! ]{3}> will find the the 3
digit numerical groups in the text provided earlier as
well as all three letter words. Have a look at the
following web page for a whole bag of neat tricks:

http://word.mvps.org/FAQs/General/UsingWildcards.htm
-----Original Message-----

What a great trick. What can I substitute in the [0-9] to
reflect any character? I tried ? and * without success.
-----Original Message-----
Brian,

You need to identify your characters as a group and have
Word replace the group with itself and the paragraph mark

If I wanted to find the numerical groups in the example
below and replace them with identical groups and a
paragraph mark, I could use.

([0-9]{3}) in the find what field
and
\1^p in the replace with field.

"Now is the time 123 for all good men 456 to come to the
aid 789 of their country."

-----Original Message-----
Hi all-

Was hoping to find a solution to the following.

Would like to find a set number of characters and add a
paragraph mark at the end of each set.

I was able to use wildcards with find; but not replace (to
advise Word *not* to replace the text, *only* to add the
paragraph mark.

Any ideas.

TIA
Regards,
Brian

.
.
.
 
B

Brian

Hi Greg-

That was some *very* handy advise... very ' teach a man to
fish'

Thanks again for the assist,
Brian
-----Original Message-----
Brian,

Several ways. For example: <[! ]{3}> will find the the 3
digit numerical groups in the text provided earlier as
well as all three letter words. Have a look at the
following web page for a whole bag of neat tricks:

http://word.mvps.org/FAQs/General/UsingWildcards.htm
-----Original Message-----

What a great trick. What can I substitute in the [0-9] to
reflect any character? I tried ? and * without success.
-----Original Message-----
Brian,

You need to identify your characters as a group and have
Word replace the group with itself and the paragraph mark

If I wanted to find the numerical groups in the example
below and replace them with identical groups and a
paragraph mark, I could use.

([0-9]{3}) in the find what field
and
\1^p in the replace with field.

"Now is the time 123 for all good men 456 to come to the
aid 789 of their country."


-----Original Message-----
Hi all-

Was hoping to find a solution to the following.

Would like to find a set number of characters and add a
paragraph mark at the end of each set.

I was able to use wildcards with find; but not replace
(to
advise Word *not* to replace the text, *only* to add the
paragraph mark.

Any ideas.

TIA
Regards,
Brian

.

.
.
.
 

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