fork(2) download
  1. <?php
  2. $input = 'My string. https://m...content-available-to-author-only...l.com?q=3 More strings.';
  3. preg_match_all('~https?://\S*|[a-zA-Z0-9/-]+~', $input, $matches);
  4. print_r($matches[0]);
  5. ?>
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
Array
(
    [0] => My
    [1] => string
    [2] => https://m...content-available-to-author-only...l.com?q=3
    [3] => More
    [4] => strings
)