RE: [PHP] Re: How do I do this

2001-12-13 Thread Philip Hallstrom
Probably something like this... $str = "[hi] there, this is me [HI][HI] there, this is me"; $newstring = ereg_replace("(\[[A-Z]*][^]])", "\\1", $str); I'm not sure if the "[^]]" should be "[^\]]" or not, but that might work. If it doesn't you could always do: $str = "[hi] there, this is me [HI]

RE: [PHP] Re: How do I do this

2001-12-13 Thread Boget, Chris
> This is untested, but something like... > $str = "[hi] there, this is me [HI] there, this is me"; > $newstring = ereg_replace("(\[[A-Z]*])", "\\1", $str); > should do it. > using the Perl regexe's might make it easier, but that should work. That worked perfectly. Is there any way I can make it