These code below will be very funny in Qt 3.3
QRegExp re("//\\s+@include\\s+(.*)\\s+\n");
re.setMinimal(TRUE); // enable perls-like non greedy matching
re.search("// @include *google.com");
re.cap(1) will not give you ‘*google.com’ instead it will give you ‘ *google.com’. Do you know why? Well, the setMinimal method is good but not enough. When used, setMinimal(TRUE) will set all pattern to be non-greedy. Thus what happen is the \s+ after “include” will match as few whitespace as possible and then give the rest to the (.*), which also match as few as possible. That regexp should have been /\/\/\s+@include\s+(.*?)\s+\n/ in Perl.
Sometimes user doesn’t want to set all pattern match to greedy or non greedy you know. Well, maybe it has been changed in Qt 4.x.
Okay this means, we’ve got support for GreaseMonkey Userscript metadata. Yay!
And about name, I wanna call this plugin as Kuskus (Konqueror User Script. what? Konqueror User Script!). I pick Phalanger ursinus for my Kuskus, among others, as it is the first thing I found from Google. Now, someone must make a logo for me