fork download
  1. <?php
  2.  
  3. $id = 248;
  4. $sTest = "247(text goes here)248(more here)";
  5. preg_match("/\b" . $id . "\(([^\)]*)\)/", $sTest, $aMatches);
  6. $sResult = $aMatches[1];
  7. echo $sResult;
Success #stdin #stdout 0s 82944KB
stdin
Standard input is empty
stdout
more here