views:

17

answers:

2

Could someone give me an example of how to I can remove

[QUOTE=author;3095231]

Author being the authors name, and 3095231 being the post.

I want to use preg replace, or anything similar but not sure how and was wondering for an example, I believe it would be something like [QUOTE=(.+?)] and i don't know the rest.

A: 

The regular expression you're looking for is

s/\[QUOTE=[^\]]+\]//
levu
A: 

Your regex looks almost right to me, you must escape the brackets though.

Assuming it's in PHP, the corresponding code would look like

$text = preg_replace('/\[QUOTE=(.+?)\]/', '', $text);
streetpc