fork download
  1. <?php
  2.  
  3. $re = '~(\bsrc=|\bhref=|(?:\bbackground:|@import)\s+url\()(["\']|\\\\u[A-Za-z0-9]{4})https?:(?:\\\\?/){2}~';
  4. $str = 'src=\\u0022https:\\/\\/sites/all/themes/omega/omega/css/modules/system/system.base.css?
  5. @import url("https://sites/all/themes/omega/omega/css/modules/system/system.base.css?oe7dml");
  6. src="http://sites/all/themes/omega/omega/css/modules/system/system.base.css?
  7. href="https://sites/all/themes/omega/omega/css/modules/system/system.base.css?
  8. one five six two twox
  9. src=\\u0022https:\\/\\/http://s...content-available-to-author-only...s.ru/all/themes/omega/omega/css/modules/system/system.base.css? и background:url("http://s...content-available-to-author-only...s.ru/all/image.png")';
  10. $result = preg_replace($re, '$1$2', $str);
  11. echo $result;
Success #stdin #stdout 0.01s 82944KB
stdin
Standard input is empty
stdout
src=\u0022sites/all/themes/omega/omega/css/modules/system/system.base.css?
@import url("sites/all/themes/omega/omega/css/modules/system/system.base.css?oe7dml");
src="sites/all/themes/omega/omega/css/modules/system/system.base.css?
href="sites/all/themes/omega/omega/css/modules/system/system.base.css?
one five six two twox
src=\u0022http://s...content-available-to-author-only...s.ru/all/themes/omega/omega/css/modules/system/system.base.css? и background:url("http://s...content-available-to-author-only...s.ru/all/image.png")