fork(1) download
  1. <?php
  2. $sEmailHTML = '["Text:"]
  3. <!-- ["Click this to authenticate"] --> <!-- [authlink] -->
  4. <!-- ["Dear"] --> <!-- [firstname] --><!-- [":"] -->';
  5.  
  6. $sEmailHTML = preg_replace ("/<!-- +(\[[\"a-zA-Z_ :]+\]) +-->/U", "\\1", $sEmailHTML);
  7. $sEmailHTML = preg_replace ("/\[\"(.+)\"\]/U", "\\1", $sEmailHTML);
  8.  
  9. var_dump($sEmailHTML);
Success #stdin #stdout 0.02s 13112KB
stdin
Standard input is empty
stdout
string(61) "Text:
Click this to authenticate [authlink]
Dear [firstname]:"