If the regular expression is all you need, try something like this:
[b]index\.php\?q=[/b]
[edit: You need to escape the period because in regular expression syntax an unescaped period means "any single character", and you need to escape the question mark because an unescaped question mark means "match the preceding character (or character class) once or zero times only".]
If you need help on the configuration (setting up a block list, et cetera), check here:
[url=http://www.squidguard.org/Doc/configure.html][b]Basic Configuration of squidGuard[/b][/url]