[AS3] using regular expressions for parsing strings

Hi there, i am experimenting with parsing textfiles into different formats, and found the regular expressions in AS3 which should do the job. The problem is, i dont understand how it works… :puzzled: Could anyone help me on this? The examples below are just to show the sort of function i am looking for (to start with).

<P ALIGN="LEFT"><FONT FACE="Arial" >this is a test</FONT></P>
[f1=arial][left][LEFT][F1]this is a test[/f][/left][/LEFT]