title: Parsing multiple json like objects in a file
body: <p>I am trying to parse F5 object. It has below structure.</p>
  <pre><code>Some Garbage text
  ltm virtual The_Name_51244_sdfasfdasd {
      address-status yes
      enabled
      fallback-persistence none
      profiles {
          /Common/GLOBAL_PROFILE {
              context all
          }
          /Common/http {
              context all
          }
      }
      rate-class none
      rules {
          /Common/X-F-F
      }
      log-profiles none
      source-address-translation {
          pool SOME-SNAT-POOL
          type snat
      }
      source-port preserve
      vlans {
          Vlan1111
      }
      service-down-immediate-action none
      service-policy none
      source 0.0.0.0/0
  }
  barbage text
  ltm virtual The_Object_51244 {
      address-status yes
      enabled
      fallback-persistence none
      profiles {
          /Common/GLOBAL_PROFILE {
              context all
          }
          /Common/http {
              context all
          }
      }
      rate-class none
      rules {
          /Common/X-F-F
      }
      log-profiles none
      source-address-translation {
          pool SOME-SNAT-POOL
          type snat
      }
      source-port preserve
      vlans {
          Vlan2222
      }
      service-down-immediate-action none
      service-policy none
      source 0.0.0.0/0
  }
  Trailing garbage text
  </code></pre>
  <p>My regex is <code>((ltm virtual) ([a-zA-Z0-9_-]*) {(.|\n)*?})</code>
  <a href="https://regex101.com/r/ATJZys/1" rel="nofollow noreferrer">https://regex101.com/r/ATJZys/1</a></p>
  <p>What I am trying to capture is name after ltm virtual and everything between curly brackets. But, above regex seems to stop at first close curly bracket match.</p>
  <p>How do I extent it to match until next parent group or match until curly brackets are balanced?</p>