ir: add ^ to the start of regexps