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.7k Views 2 Watching
    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 Offline
      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 Offline
        MAPJe71
        last edited by

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

        1 Reply Last reply Reply Quote 0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        • First post
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors