regexp memoization for the extends and block tags