+ Reply to Thread
Results 1 to 2 of 2

Word RegEx turn off single line mode

  1. #1
    Registered User
    Join Date
    11-09-2016
    Location
    London, England
    MS-Off Ver
    2010/2016
    Posts
    72

    Word RegEx turn off single line mode

    Hey,

    I've got a macro in Outlook that checks the subject for a pattern. This works perfectly.

    I've adapted the pattern match slightly for Word because I am checking the entire document, rather than one line. I cannot for the life of me get it working in Word how I want, not matter what I set .MultiLine to.

    Please Login or Register  to view this content.
    This is the (simplified) document contents:

    OUR REF: ABC/DEF/GH43024IJ
    YOUR REF: Some reference


    No. KLM/NO2012/052963

    Dear sirs,

    The quick brown fox jumps over the lasy dog.

    Regards,
    Sign name

    Expected match groups:

    regex-expected.PNG

    What Word does - return everything as one match:

    regex-word-match.png

    Any ideas?

    Thanks

  2. #2
    Registered User
    Join Date
    11-09-2016
    Location
    London, England
    MS-Off Ver
    2010/2016
    Posts
    72

    Re: Word RegEx turn off single line mode

    That was pretty silly of me. Changed the last bit to [^\n\r]+ and that sorted it.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] How to use REGEX in word
    By zaska in forum Word Formatting & General
    Replies: 12
    Last Post: 11-20-2023, 12:14 PM
  2. Regex to find certain Word
    By AbertBean in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-13-2018, 07:23 AM
  3. Different row heights for single line and word wrapped?
    By a_gunslinger in forum Excel General
    Replies: 4
    Last Post: 04-12-2016, 10:23 AM
  4. Replies: 9
    Last Post: 09-03-2015, 03:04 PM
  5. Link Word Multiple Line Data into Excel Single Cell
    By mohanvamsi_18 in forum Excel General
    Replies: 0
    Last Post: 01-21-2010, 03:52 AM
  6. [SOLVED] How to Import multiple-line addresses from Word into single cell?
    By Queen Mother in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-21-2006, 01:10 PM
  7. [SOLVED] How do I turn off [Group] mode?
    By tothemax in forum Excel General
    Replies: 3
    Last Post: 03-17-2005, 06:06 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1