Seem to have a mental block (or perhaps it's 4am). Can't get my head round regular expressions. Whether it's because I'm mixing the concept of wildcard characters with regular expressions, I dont know.

Can anyone recommend a online tutorial that won't assume I too smart or too stupid?


[Slyly hope someone will solve it for him...not really]
Basically trying to convert a character string into a table;

<?php

$text = ( "This is a table HeadingA HeadingB 234 534 HeadingC HeadingD 42% 95%" );

$text = ereg_replace ( huh? , huh?, $text );

So that it end ups something like;

$text = ( "
<p>This is a table</p>
<table>
<tr>
<td>HeadingA</td><td>HeadingB</td>
</tr>
<tr>
<td>234</td><td>534</td>
</tr>
<tr>
<td>HeadingC</td><td>HeadingD</td>
</tr>
<tr>
<td>42%</td><td>95%</td>
</tr>
</table> " )

Are regular expressions actually the right way to go with a situation like this?

Anyway, many thanks and goodnight.