Jump to content

Recommended Posts

Posted

I'm trying to achieve a better BBCode parser (for my wiki) using regex to do tables.

At the moment, I have a table command and such, but it does not allow attributes like a real table. What I want is a simple preg function that allows the parser to detect a [table] tag and convert it directly to html, including any attributes inside it (all of the attributes are converted raw). The same goes for [row], [data], and [heading] commands, but those would simply be tweaked versions of the table tag.

 

Anybody willing to help?

Posted

Sure, why not.

 

In my opinion, the easiest way of doing this is by use of the 'e' selector that you get with PCRE. i.e. do a preg for the [table] tag, then pass the contents to a function which parses the interior. Shouldn't be too hard :)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.