fork download
  1. <?php
  2. $str = "the word <cite>printing<cite> is in http://w...content-available-to-author-only...w.thisis<cite>printing</cite>.com";
  3. $replaced = preg_replace('#(https?://)(.*?)<cite>(.*?)</cite>([^\s]*)#s', "$1$2$3$4", $str);
  4. echo $replaced;
Success #stdin #stdout 0.01s 20568KB
stdin
Standard input is empty
stdout
    the word <cite>printing<cite> is in http://w...content-available-to-author-only...g.com