Firstly define as , where are strings of which contain strings of as substrings.
Then will be strings of that do not contain strings of as substrings.
Define as . Then are strings of which contain strings of as substrings.
Thus here also have
Since, regular languages are closed under concatenation, intersection, and subtraction they are also closed under operation avoid.
Here the regular language follows the property of avoid if it can be expressed in terms of regular expression.A regular expression can also be described as a sequence of pattern that defines a string. Regular expressions are used to match character combinations in strings.
Hence, the class of regular languages is closed under the avoids operation is proved.