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]
> 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
2 matches
Mail list logo