fork(8) download
  1. <?php
  2. $uri = "[Test1] Title [Test9].jpg";
  3. $str = "'".$uri."'";
  4. if (preg_match('/\[(.+?)\]/', $str, $matches)) {
  5. echo "[".$matches[1]."]";
  6. }
  7.  
Success #stdin #stdout 0.02s 13064KB
stdin
Standard input is empty
stdout
[Test1]