Gossamer Forum
Home : Products : Gossamer Forum : Discussion :

regex to match/strip/convert markup tags

Quote Reply
regex to match/strip/convert markup tags
Has anyone come up with a regex that matches markup tags, without also matching any text between markup tags? I tried something as simple as \[+\], but of course that would match any non-markup text between an opening and closing markup tag, for example.

What I'm trying to do is include some "most recent posts" blurbs on my home page, which is in PHP. I'm able to use PHP to pull the information from the gforum_Post table, but the post_message field contains markup content. I need a way either to strip out the markup altogether, or (ideally) to convert it to HTML. I'm sure that's easy to do with the GT libs, but since my home page is in PHP, that's not really an option.

Thanks in advance for any ideas or suggestions.

Fractured Atlas :: Liberate the Artist
Services: Healthcare, Fiscal Sponsorship, Marketing, Education, The Emerging Artists Fund
Subject Author Views Date
Thread regex to match/strip/convert markup tags hennagaijin 3250 Dec 6, 2002, 1:44 PM
Thread Re: [hennagaijin] regex to match/strip/convert markup tags
hennagaijin 3176 Dec 8, 2002, 6:59 AM
Thread Re: [hennagaijin] regex to match/strip/convert markup tags
Paul 3175 Dec 8, 2002, 7:02 AM
Post Re: [Paul] regex to match/strip/convert markup tags
hennagaijin 3171 Dec 8, 2002, 7:34 AM