I got this code..
$expr = '\(?:http://){0,1}(?:www.){0,1}youtube.com/watch\?.*?v=([^&[]++)[^[]*+/is';
$replacement = '${1}1,$3';
$string = preg_replace($expr, $replacement, $string);
I am not familiar with regex well enough to understand the problem here. the \ in the front of $expr and the /is at the end is causing this code not to work. No idea what I am supposed to have there instead. Been messing around with the code but can't figure out how to fix it.
Warning: preg_replace(): Delimiter must not be alphanumeric or backslash in /var/www/se1/includes/functions.php on line 74 Warning: preg_replace(): Delimiter must not be alphanumeric or backslash in /var/www/se1/includes/functions.php on line 74 Warning: preg_replace(): Delimiter must not be alphanumeric or backslash in /var/www/se1/includes/functions.php on line 74 Warning: preg_replace(): Delimiter must not be alphanumeric or backslash in /var/www/se1/includes/functions.php on line 74 Warning: preg_replace(): Delimiter must not be alphanumeric or backslash in /var/www/se1/includes/functions.php on line 74