Jump to content


String stuff

  • Please log in to reply
1 reply to this topic

#1 Kasuke_Akira

  • Members
  • PipPipPip
  • Advanced Member
  • 39 posts

Posted 12 July 2006 - 09:56 PM

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.

One must not shed tears. That is the defeat of the body by the heart.
Because this thing called "the heart" can become nothing less than
proof that one's existence is superfluous.

#2 GingerRobot

  • Staff Alumni
  • Advanced Member
  • 4,086 posts
  • LocationUK

Posted 12 July 2006 - 10:21 PM

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:


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users