In the realm of searching and pattern matching strings, we've talked about regular expressions but have not gone to any depth with them. You might have heard they are very complex, and there is a bit of a learning curve to using them properly and correctly.
That is not an exagerration. Some folks think of them as a separate programming language.
One of the best books on regular expressions is
Mastering Regular Expressions
Jeffrey E.F. Friedl
There are other books as well as web resources available and a search for regular expressions will give you hundreds of results.
We will discuss the small number of uses we've used at this site, but you are encouraged to follow up with your own research.
You may believe looking for a word or string of characters in a document of file is a simple task. Your word processor, text editor, or spreadsheet application has numerous ways finding and replacing text. It is an essential task of anyone dealing with reams of data.
Years ago I used the search-and-replace feature of WordPerfect (yes, I'm dating myself) to assist in writing technical documentation. Many documents I dealt with had technical terms (usually long and cumbersome to type) which were used throughout the document. Rather than type each word every time, risking typos, I used an odd string of characters in place of the cumbersome word. Then, when the document was finished, I used the search feature. I would search for that string of characters and replace them with the correct spelling of the word. This only had to be done once, and saved a lot of time and embarassment.
Go ahead - I give you permission to use that little trick if you're doing anything similar.
The take-away here is that the task of finding text was such a large part of writing, every word processor had that feature. The code for doing that would have involved regular expressions.