Results 1 to 5 of 5
  1. #1
    Star Lounger
    Join Date
    Jul 2008
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Need RegEx To Find Tags/Links (Office 2003)

    I have found incomplete hyperlink code in my document. I need a regular expression to find text between the <U> tags when the text between the <U> tags does not contain both sets of references separated by the ">.

    I need a MS Word regular expression to find text like the following.
    <U>Jam 1:13</U>
    <U>Gen 1:1-12</U>
    <U>Exo 2:10</U>

    I want the expression to NOT find text like the following.
    <U>Jam 1:3">Jam 1:3</a></U>

    Thank you in advance for your help and replies.

  2. #2
    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: Need RegEx To Find Tags/Links (Office 2003)

    Do you want a VBScript RegEx pattern or do you want a Word wildcard search expression?

    Since you have started numerous threads on this project, I am listing some of the links here for quick reference. I haven't reviewed them to see which might be helpful with this particular inquiry.

    Help integrating pargph. mark and tabs in wildcard (MS Office 2003)
    Need macro to find non-slashed apostrophes (MS Off
    VBA Regular Expression (Word 2003/VBA)
    Need to find broken hyperlinks in txt files (Word
    Using RegEx In Word And Excel (MS Office 2003)
    Need RegEx Tutorial (MS Office 2003)

  3. #3
    Star Lounger
    Join Date
    Jul 2008
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Need RegEx To Find Tags/Links (Office 2003)

    Thank you for the response.

    I need an MS Word wild card regular expression likely using the NOT operator. I have searched through previous posts, on the web, in tutorials, in Expresso, etc. but have not come up with anything. I have not been able to develop a NOT expression that will find text and numbers between the <U> tags while skipping over the longer tags noted in my first post.

    I tried to develop a MS Word macro but that did not work either.

    Thank you again for the response.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Need RegEx To Find Tags/Links (Office 2003)

    Would this work for you as a search string in Word (with wildcards turned on)?
    <code>
    <U>[!>]@</U>
    </code>
    Note that it isn't necessary to escape > with a if you use it between [ and ].

  5. #5
    Star Lounger
    Join Date
    Jul 2008
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Need RegEx To Find Tags/Links (Office 2003)

    Yes! It works great, Hans. Thank you for the help.

Posting Permissions

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