Community
    • Login

    Regular Expression to get text between words separated with line break

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    scriptregexregexregex
    2 Posts 2 Posters 1.5k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • Sourav GhoshS
      Sourav Ghosh
      last edited by

      I need to get the text between two words but both the words are in different line using regular expression in vb script.

      For Example,
      str = “Hello World
      Information Address 908 BLVD
      Avenue Property Type Occupied”

      I need “908 BLVD Avenue” using regex.So my regex pattern must be anything between “Address” and “Property Type”. Till now , I could able to find “908 BLVD” using
      (?<=Address)(.*)\s
      but unable to get text before Property Type in same regex function.

      Thanks

      1 Reply Last reply Reply Quote 0
      • MAPJe71M
        MAPJe71
        last edited by

        (?s)(?<=Address\x20).*(?=\x20Property\x20Type)

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors