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? Quote 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? Quote 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 Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/181935-just-a-little-help/#findComment-959626 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.