Knowledge is power. Data is king! And knowing how to manage data, process it and analyze it always shows you areas of improvement and interesting trends, regardless of your occupation. Be it feedback, suggestions, personal information, browsing habits, server logs, financial data, scientific observations, presentations or even books and news that we encounter every day, our lives are filled with information. That is sitting on a computer, maybe on a cloud, who knows where. But it is there to be used and to help you stay at the top of your job. Nonetheless, just as the connections between neurons in your brain weaken, data gets misplaced, lost and potentially jumbled. Thus, organizing it is a recurring task we must undertake.
Regexps or regexes, however you like to call them, comprise a pattern matching system for text, like an advanced find and replace tool as seen in word processors. I won’t go over how to use them in this article, as there are tons of cheatsheets and guides all over the Net.
Using signs and symbols, like asterisks, brackets and other special characters, a regex engine or a library will enable you to find patterns in large swathes of text by processing a source expression, entered by you. It, effectively, decomposes the whole into delimited sections analogous to how vectors in Math and Physics enable one to separate one action into independent components which can be dealt with separately.
Regular expressions are ubiquitous; you can find them in web forms, validating email addresses, in web server directives(for example, to show you a page without you needing to type in the .html or .php after the web pages name), in advanced text editors like Notepad++ to sort text and even while batch renaming files and folders through a command-line.
A well-crafted regular expression, can save you a lot of time spent manually making changes(such as ensuring that all commas in a file are only followed by 1 space) and dramatically .
Learning how to wield the magic wand that is RegEx will take you one step closer to being a power user.