CodeIgniter Forums

Full Version: Preg_replace error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

A PHP Error was encountered
Severity: Warning
Message: preg_replace() [function.preg-replace]: Unknown modifier '('
Filename: helpers/custom_helper.php
Line Number: 20

$text = preg_replace('([[:space:]()[{}])(www.[[email protected]:%_\+.~#?&//=]+)',
'<a href="http://\\\\2" class="oembed" target="_blank">\\2</a>', $text); #line 20

Disregard the other \\