Is a string that defines a search pattern. It is an algorithm. We can say that it is a language for finding patterns in text.
She’s not a programming language, but its implementation is available in virtually all standard libraries of programming languages, or by third party library.
Some implementations are quite simple having only one function, others have several classes with several utilities. Some languages prefer to embed it as a construct. There are language variations. Some more complete, others only with the main codes.
We can say it’s a design pattern, but how it is so old, so pervasive, that no one even defines in this way.
It is a way of obtaining the localization of text patterns within other texts through a sequence of codes that indicate how this pattern should be composed to fit what is sought. Other ways can be tedious, require larger code and the programmer can make mistakes more easily, although inexperienced programmers can create several false positives if they do not test properly.
It is common to have functions, which in addition to locating makes the change of a pattern by some other text.
It is usually abbreviated as regex or regexp.
I find it particularly unreadable and prefer functions that indicate more "fully" what you want (some languages have libraries for this) and it is often much slower than making a loop in the hand (some cases can be quite complicated, but if you have functions that help is not bad). I would respect it more if it were a variation of ABNF.
I believe this Answer can help. http://answall.com/a/165413/14213
– Guilherme Lautert
Possible duplicate of What can make a regular expression slow?
– Pedro Abreu