fork download
  1. <?php
  2. $str = 'http://e...content-available-to-author-only...e.com/blabla-bla-i123213131345/blabla';
  3. $pattern = '/-i[0-9]+/';
  4. preg_match($pattern, $str, $matches);
  5. var_dump($matches);
Success #stdin #stdout 0.01s 20520KB
stdin
Standard input is empty
stdout
array(1) {
  [0]=>
  string(14) "-i123213131345"
}