Results 1 to 6 of 6
  1. #1
    3 Star Lounger
    Join Date
    Jul 2002
    Location
    Edison, New Jersey, USA
    Posts
    215
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Seaching for a string of numbers. (W97)

    I'm wanting to search through a series of outline numbers (not autonumbered). I'm wanting to find all 2 digit numbers like, 4.5, but not include3 digit numbers like 4.5.6.
    I tried doing a search for ^#.^#.... and then I tried ^#.^#^p (paragraph end).... but then it would select the last 2 digits of a number. I've got to think there IS a way. I'm just not hitting upon the right wildcard.

    PS. Each number is followed by a paragraph mark
    2
    2.1
    2.2
    2.2.1
    2.2.2

    I'm wanting to select 2.1 and 2.2.... and NOTHING else.

    Help, Anyone?

  2. #2
    4 Star Lounger
    Join Date
    Dec 2000
    Location
    Faifax, Virginia, USA
    Posts
    542
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Seaching for a string of numbers. (W97)

    perhaps including the metacharacters that indicate 'start of word'?

    or maybe ^p#.#.^p ?

  3. #3
    3 Star Lounger
    Join Date
    Jul 2002
    Location
    Edison, New Jersey, USA
    Posts
    215
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Re: Seaching for a string of numbers. (W97)

    I was thinking along the logic of start of word, but don't know if there's a metacharacter for that.

  4. #4
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Seaching for a string of numbers. (W97)

    With wildcards turned on, there is a start of word character -- <[0-9]@.[0-9]@ -- but a period is considered a word delimiter, it will find a match at "secondlevel.thirdlevel" in your example.

    Why are you doing this? Maybe there is another solution...

  5. #5
    3 Star Lounger
    Join Date
    Jul 2002
    Location
    Edison, New Jersey, USA
    Posts
    215
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Re: Seaching for a string of numbers. (W97)

    OOOOOh, there is definately an easier way! I aquired tunnel vision when we started out by pasting into an excell spreadsheet and lost all formatting.

    The answer is as simple as altering my TOC styles. When I convert it to a table, the style is carried with.

    I guess I just had to step away from it for a few hours. I actually started to "hear" the answer as I wrote my previous entry.

    Case Closed

  6. #6
    3 Star Lounger
    Join Date
    Jul 2002
    Location
    Edison, New Jersey, USA
    Posts
    215
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Re: Seaching for a string of numbers. (W97)

    I'm doing a search and replace to apply styles. We have a requirement traceability matrix that was started by creating a TOC, breaking the link and converting it to a table. Now, I want to find all outline level 2s and apply a specific style, etc for the other levels.

    I have attached a mini sample of the table. The original table has over 1000 rows.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •