functionaliy to ignore text based on user specified regex