Path string to Reg. expression