Cunning hack to use regex back-references to do the expression matching