refinement of regex varable highlighting