About Regular Expressions

You should list the options in Regular Expression patterns in reverse alphabetical order: from Z to A.

That way you can ensure that if there are any words that are part of other words, the longer word will be taken into account.

For example, searching for regex (book|car|carpet) in a sentence "I bought a new carpet.", the "car" will be found.

But if we reverse the order of the options to (carpet|car|book), the "carpet" will be found.

Programming Python 3 JavaScript PostgreSQL MySQL SQLite Bash Regular Expressions