# Help with tables in a wiki

**URL:** <https://forum.kirupa.com/t/help-with-tables-in-a-wiki/189583>\
**Category:** Uncategorized\
**Created:** [June 4, 2006, 4:40am UTC](https://forum.kirupa.com/t/help-with-tables-in-a-wiki/189583 "2006-06-04T04:40:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![logikal2](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/logikal2/32/1143_2.png) [@logikal2](https://forum.kirupa.com/u/logikal2)\
**Post date:** [June 4, 2006, 4:40am UTC](https://forum.kirupa.com/t/help-with-tables-in-a-wiki/189583/1 "2006-06-04T04:40:12Z")

</div>

Hey again,

I’m in the process of adding/fixing a tables feature for my wiki and i was wondering how’d i’d convert the following syntax into working tables using RegEx:

[TABLE]  
r1c1|r1c2|r1c3|  
r2c1|r2c2|r2c3|  
r3c1|r3c2|r3c3|  
[/TABLE]

if there is nothing (or a newline) after a “|”, then close the row and go on to the next row (as long as the beginning of the next row isn’t a [/TABLE].

Also, if its the first row, I need to know it so that I can give the “header” a different BG-color.

By the way, earlier in the code, i substituted all "  
" for "\*br /\>, in case that matters.

Thanks in advance!  
Matt
