[bksvol-discuss] Re: For Lori - tricks for find and replace to get rid of parentheses around page numbers

  • From: Debby Franson <the.bee@xxxxxxxxxxx>
  • To: bksvol-discuss@xxxxxxxxxxxxx
  • Date: Sun, 03 Jan 2010 22:37:07 -0600

Hi Judy S.

Wow! What a great detailed message. I put the text of this message in my Help Desk folder in case I get a book that needs this treatment.

Thanks for such clarity.

Debby

At 06:57 PM 12/31/2009, Judy s. wrote
Hi Lori,

I had to something similar a while back with page numbers that had brackets around them. I didn't remember how I did it, so I snagged my Word Guru (aka Michael, my husband) and had him show me again.

I'm going to give you instructions on how to do this two different ways.

The first way works if there aren't any spaces between the parentheses and the numbers. The second way works if you do have any number of spaces before and or after the parentheses and your page number.

It's going to seem like magic numbers if you aren't a programmer who uses what are called "regular expressions" and wild cards, but it can be done. smile. So here's my instructions.

Before you do anything, save a copy of the file just in case, so you don't lose any of your previous work on the book.

How to do Way One. Use this way if you don't have any spaces between the parentheses and the numbers.

You use a special kind of search, using the "use wildcards" box in the find and replace dialogue.

In the Find and Replace dialogue box, click on the button that is marked "More." This will expand the options that are available in the Find and Replace box to include a new list of Search Options. In the list of Search Options, check the box for "use wildcards" (you can also do this while in the Search box by typing alt U, which is alt "capital U)

Next, in the find box, enter the following exact string:

\(([0-9]@)\)

that is, back-slash left-parentheses left-parentheses left-square-bracket zero hyphen nine right-square-bracket at-sign right-parentheses back-slash right-parentheses

In the replace box, enter the following exact string:
\1

that is backslash numeral-one

You can then execute a "replace all" or if you want to be safer (until you are sure this is working exactly right), instead execute a find and as it finds each page number in parentheses that you want to fix execute a replace each time.

Here's how to do Way Two, which will find every page number and strip the parentheses even if there are spaces in front of and-or behind the page numbers.

You use a special kind of search four times, using the "use wildcards" box in the find and replace dialogue.

In the Find and Replace dialogue box, click on the button that is marked "More." This will expand the options that are available in the Find and Replace box to include a new list of Search Options. In the list of Search Options, check the box for "use wildcards" (you can also do this while in the Search box by typing alt U, which is alt "capital U)

Next, in the find box, enter the following exact string to do search one:

\(([0-9]@)\)

that is, back-slash left-parentheses left-parentheses left-square-bracket zero hyphen nine right-square-bracket at-sign right-parentheses back-slash right-parentheses

In the replace box, enter the following exact string:
\1

that is backslash numeral-one

You can then execute a "replace all" or if you want to be safer (until you are sure this is working exactly right), instead execute a find and as it finds each page number in parentheses that you want to fix execute a replace each time.


Next, in the find box, enter the following exact string to do search two:

\( @([0-9]@)\)

that is, back-slash left-parentheses space at-sign left-parentheses left-square-bracket zero hyphen nine right-square-bracket at-sign right-parentheses back-slash right-parentheses

In the replace box, enter the following exact string:
\1

that is backslash numeral-one

You can then execute a "replace all" or if you want to be safer (until you are sure this is working exactly right), instead execute a find and as it finds each page number in parentheses that you want to fix execute a replace each time.

Next, in the find box, enter the following exact string to do search three:

\(([0-9]@) @\)

that is, back-slash left-parentheses left-parentheses left-square-bracket zero hyphen nine right-square-bracket at-sign right-parentheses space at-sign back-slash right-parentheses

In the replace box, enter the following exact string:
\1

that is backslash numeral-one

You can then execute a "replace all" or if you want to be safer (until you are sure this is working exactly right), instead execute a find and as it finds each page number in parentheses that you want to fix execute a replace each time.

Next, in the find box, enter the following exact string to do search four:

\( @([0-9]@) @\)

that is, back-slash left-parentheses space at-sign left-parentheses left-square-bracket zero hyphen nine right-square-bracket at-sign right-parentheses space at-sign back-slash right-parentheses

In the replace box, enter the following exact string:
\1

that is backslash numeral-one

You can then execute a "replace all" or if you want to be safer (until you are sure this is working exactly right), instead execute a find and as it finds each page number in parentheses that you want to fix execute a replace each time.

That's it!!

Good luck.  smile.

Judy s.



Lori wrote:
Hi all,
I just discovered that a book has parenthesis around each page number.
I'm thinking I probably need to eliminate them. I know I could do this by hand, but I'm wondering if find and replace can be exercised. For instance, can you use wildcards? I'd like to perform a find and replace for (*) (**) and (***) to make sure I get all of the page numbers. Of course, the * would be the digit. Anyone ever done this?

To unsubscribe from this list send a blank Email to
bksvol-discuss-request@xxxxxxxxxxxxx
put the word 'unsubscribe' by itself in the subject line. To get a list of available commands, put the word 'help' by itself in the subject line.



No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.722 / Virus Database: 270.14.123/2594 - Release Date: 12/30/09 01:27:00


        --
mailto:<the.bee@xxxxxxxxxxx>
--
Enjoy what you have rather than desiring what you don't have. Just dreaming about nice things is meaningless; it is like chasing the wind.--Ecclesiastes 6:9 NLT

To unsubscribe from this list send a blank Email to
bksvol-discuss-request@xxxxxxxxxxxxx
put the word 'unsubscribe' by itself in the subject line.  To get a list of 
available commands, put the word 'help' by itself in the subject line.

Other related posts: