+ Reply to Thread
Results 1 to 4 of 4

RegEx pattern to extract multiplelines title in TXT file

  1. #1
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    RegEx pattern to extract multiplelines title in TXT file

    What would be the pattern for a regular expression to extract the titles (Titre) from the attached txt file?
    You will see that titles can be on one, two, three or more lines. I would like to get all of them.
    I've got the same issue with the Editeur section.
    Thanks
    Attached Files Attached Files
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  2. #2
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,412

    Re: RegEx pattern to extract multiplelines title in TXT file

    Salut!
    Here's a proposal :

    Please Login or Register  to view this content.
    GC Excel

    If this post helps, then click the star icon (*) in the bottom left-hand corner of my post to Add reputation.

  3. #3
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: RegEx pattern to extract multiplelines title in TXT file

    Thanks GC for this solution but I thought there would be a fancy pattern to do this by its own.
    I hope I would have other answers though.

  4. #4
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: RegEx pattern to extract multiplelines title in TXT file

    For the befenit of all, here is what I found to work in this situation:
    Pattern="Titre[\S\s]*?)Éditeur"
    It will select all characters and as many lines as there are between the words "Titre:" and "Éditeur:"

+ 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 extract the most frequent pattern formed out of six numbers
    By mschv90 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-03-2014, 04:30 AM
  2. Extract data between match pattern, process in another sheet
    By 123raajesh in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-30-2014, 12:38 PM
  3. regular expression to extract multi instances of pattern from cell
    By starfish_001 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-11-2013, 07:45 PM
  4. [SOLVED] Looking for a way to extract a text with a pattern in a string.
    By domino21 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-04-2012, 08:01 PM
  5. Need a new regex .pattern for comparison code
    By Swiss Cheese in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-06-2012, 09:16 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