fork download
  1. <?php
  2. $text = 'First string here(second here)';
  3. if (preg_match('~^([^\(]+)\(([^\)]+)\)$~', $text, $match)) {
  4. print "$match[1]\n";
  5. print "$match[2]";
  6. }
  7. ?>
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
First string here
second here