Added restrict flag that uses regex to restrict processing