Memoized d= finder regex to avoid compiling it every time