title: Find string then look behind to find another with regex
body: <p>I basically have a txt file listing all job definitions.  I'd like to figure out which of these jobs use global variables which are always in the format of (v(someText).  Is it possible using regex to match the variable, then match the preceding jobname?  In this example I was hoping to match vaiable1 and variable2 with jobnameB (ideally in two matches with capture groups)</p>
  
  <pre><code>/* ----------------- jobnameA ----------------- */ 
  
  insert_job: jobnameA   job_type: CMD 
  date_conditions: 0
  alarm_if_fail: 1
  
  
  /* ----------------- jobnameB ----------------- */ 
  
  insert_job: jobnameB   job_type: CMD 
  date_conditions: 1
  days_of_week: tu,we,th,fr,sa
  condition: s(job1) &amp; s(job2) &amp; (v(variable1) = "Y" | s(job1)) &amp; (v(variable2) = "Y" 
  alarm_if_fail: 1
  job_load: 1
  priority: 10
  
  
  /* ----------------- jobnameC ----------------- */ 
  ...
  </code></pre>
  
  <p>I can match all variables using:</p>
  
  <pre><code>\(v\((.*?)\)
  </code></pre>
  
  <p>And all jobs with something like:</p>
  
  <pre><code>insert_job: (\S*?)\s
  </code></pre>
  
  <p>But I'd like to conditionally match the jobname on the presence of the variable.
  Or is regex not the best way to achieve this?</p>