optimized  regexp parser