[% SET a = 'aaa12aaa34aaa56' -%] [% a.match('\\\d\\\d','g').join(' ') %]