I am trying to remove all of the elements from a list that contain the characters "err"
in that order.
I expect the following code to return an empty list:
DeleteCases[{"Aerr"}, __ ~~ "err"]
However it fails to recognize the pattern and will return the full List. What am I missing in the documentation for patterns? Perhaps it is an issue with DeleteCases
, as I can use StringMatchQ
to identify that the patterns match.
StringMatchQ["Aerr", __ ~~ "err"]
Returns True
.