Would like to know what $1 does?

Yes:

and there is also a page that gives hints how to format strings like

so that they come out like
$regexp(%comment%,(.*): (.*),$1)