Jump to content


This topic is now archived and is closed to further replies.


String stuff

Recommended Posts

ok i have this:


in an array.

i know what the /i does, but i am curious what the /s is doing and also i am curious if there is a way so that when the ereg_replace() function replaces what it does, if there is something that makes it to where ereg_replace() has to find the exact word.  like if [evilgrin] is touching other letters like this : hello[evilgrin]  , that it won't replace the [evilgrin]; i want it to only replace [evilgrin] if it is by itself.

thanks.  hope you understand what i mean, im basically looking for another '/*' option that allows this.  thanks.

Share this post

Link to post
Share on other sites
You'll want to make the pattern:

$pattern = '/\s\[evilgrin\]\s/is';

the \s i added means any whitespace character.

for information on the modifiers, look at the manual:


Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.