Community

    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search

    Regular Expression to get text between words separated with line break

    Help wanted · · · – – – · · ·
    script regex regular express regexp
    2
    2
    1251
    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 Ghosh
      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
      • MAPJe71
        MAPJe71 last edited by

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

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Copyright © 2014 NodeBB Forums | Contributors