We're trying to avoid dropping Tcl snippets in the query files (such as "$list_of_ids"), though they keep sneaking in. The reason is that there have been some people who've stated an interest in using the datamodel and query files to rewrite at least parts of the toolkit in another language. Tcl snippets make that more difficult.
I personally doubt that anyone will do this but we've been trying to avoid raising artificial barriers.
Just so you know, PG does have regexp operators.