http://doc.trolltech.com/4.4/qregexp.html#details—this section is based on the information provided there