<?php $re = '`\bhttps?\K(?=//)`m'; $str = 'https//example.com'; $subst = ':'; echo preg_replace($re, $subst, $str);
You have javascript disabled. You will not be able to edit any code.