What is Regular Expressions `RegEx`?

Regular Expressions are a string of characters that express a search pattern. Often abbreviated as `RegEx` or `RegExp`. It is especially used to find or replace words in texts. In addition, we can test whether a text complies with the rules we set.\n\n For example, let's say you have a list of filenames. And you only want to find files with the `pdf` extension. Following typing an expression `^\w+\.pdf$` will work. The meaning of the definitions in this expression will become clearer as the steps progress.