In nature few creatures demonstrate shear strength, in proportion to their size, as well as the leafcutter ant. Able to carry material around 50 times its own body weight this tiny animal are real power lifter. I personally see them as analogous to the Regular Expression (RegExp) technique in computing – small but mighty.
Another similarity ants have with RegExp is the way in which they are even more powerful when working as a collective. In my opinion its is essential that professional software engineers possess a good understanding of this technique, especially given how widespread it can be found and used.
However, RegExp suffers significantly from its obscure syntax that engenders an air of mysticism as though written in the runic alphabet. Those of use that have spent time attempting to get to grips with the syntax find it a very powerful tool but can appear to some as wielders of a black-art. To continue with the fantasy theme: to those that find the language too challenging the string of characters might as well read “Fear ye all who proceed further for beyond lies the domain of dragons.”
To be fair, even those of us that feel comfortable working with Regular Expressions can find patterns prepared by others difficult to comprehend. But there is the trade-off. The processing power is in the parser that interprets the patters, matches and replaces strings. This means the patterns have to be in more a computer-readable than human-readable form.
From personal experience I would advocate you spend time learning how to wield the RegExp magic and become a Leafcutter Ant.
References and Useful links
- Beginner’s Guide to Regular Expression (Regex) – Hongkiat
- 30 Regex Code Snippets All Web Developers Should Know – Hongkiat
- Regular Expressions: 30 Useful Tools and Resources – Hongkiat
- Regular Expression library – RegExLib.com
- My personal favourite on-line RegExp resource – Debuggex
- Learning, Building and Test resource – RegExr