PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Yes, it's basically a large string matching and massaging functionality.
Take a look around for bbcode and wikicode (or variants thereof) parsers. There are many out there; a bunch have been posted about here.. including by yours-truly.
Both have their share of merits and problems. Depending on how complex you want to go, they can equally get quite hairy. Typical parsers against each other, wiki-style ones will often be more simple and create cleaner resultant HTML. But mileage will vary.