apply url regexp only when custom option is true