If it's brackets and such that you're having problems with then you should look for TCL references, not iRule ones. iRules are built in the TCL language, and it sounds like the problems you're having are language related.
TCL is (as I like to put it) "simply complex". The actual rules behind the language are incredibly simple, and there's really very little to them. However, they interact in some quite complex ways.
Usually I use the TCL reference liked to by the iRule editor:
http://tmml.sourceforge.net/doc/tcl/index.html
Click here
The basic rules of the language as far as what the different kinds of brackets do are here:
http://tmml.sourceforge.net/doc/tcl/Tcl.html
Click here
I'd suggest giving that a read (or maybe 3), and also looking at some of the control construct documentation. It's helped me a lot (though I still get easily confused).
EDIT: Finally figured out how to make links clickable!