2 Replies Latest reply on Feb 8, 2007 3:43 PM by cfjeeper

    converting bbcode into HTML

    cfjeeper
      Just curious of how one would approach this.

      i'm trying to convert bbcode to its HTML equivalent on the fly from a mySQL 5 db into a MS-SQL 2005 db.

      Consequently, I need to catch a few basic instances (b, i, u, url, img, etc.) and past them thru to clean . . .convert stuff like
      [i:56a7309fdd] something here [/i:56a7309fdd] and convert it into its standard tag in HTML


      any takers?
        • 1. Re: converting bbcode into HTML
          Dinghus Level 1
          Use the REPLACE command. Make your entire block of code into a string variable and then REPLACE. It will take a number of steps but that is about all you can do.
          • 2. Re: converting bbcode into HTML
            cfjeeper Level 1
            yeah. . .i tried a few things with Replace and ReplaceList. . . it was barking on the [ and the ] . I took a peek at the db did ran a few queries to see how much data was there. Me and a co-worker agreed that time would be better spent with a browser's view source and a grid. . .than trying to figure out something that would just be cool for just this one thing. . .

            but non-the-less, I really do appreciate the respond Dinghus. (thumbs up)