adam84 Posted November 17, 2009 Share Posted November 17, 2009 I want to get rid of different references (ie the '[1]' ) within my text. For instance: "I went to the store today[1]. Tomorrow I will get some carrots.[3]" $pattern = \[[0-9]\]; Is this correct? Link to comment https://forums.phpfreaks.com/topic/181935-just-a-little-help/ Share on other sites More sharing options...
Daniel0 Posted November 17, 2009 Share Posted November 17, 2009 Did you try it? Link to comment https://forums.phpfreaks.com/topic/181935-just-a-little-help/#findComment-959619 Share on other sites More sharing options...
adam84 Posted November 17, 2009 Author Share Posted November 17, 2009 totally. I got the error: preg_replace() [function.preg-replace]: Delimiter must not be alphanumeric or backslash Link to comment https://forums.phpfreaks.com/topic/181935-just-a-little-help/#findComment-959620 Share on other sites More sharing options...
Daniel0 Posted November 17, 2009 Share Posted November 17, 2009 Right, you can to delimit your pattern. http://dk.php.net/manual/en/reference.pcre.pattern.syntax.php preg_replace Link to comment https://forums.phpfreaks.com/topic/181935-just-a-little-help/#findComment-959626 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.