Oh my God, what is ^(?[0-9]|2[0-3]):[0-5][0-9] (AM|PM)$? How about ^[a-zA-Z0-9]+[^ ]*@[^ ]*\.(org|net|com|gov\us|edu)$? Yep folks, these are regular expressions. Depending on whatever in a file you’re trying to match/find, you can certainly make your regular expression to be even more complicated and unique. Anyhow, the first regular expression I had mentioned was to match the appropriated format of the 24 hour time. This would be something like 23:43 AM and not 29:333 PM. The second regular expression can certainly be customized even more to match even more email addresses with unique top level domain names. So, regular expression is very powerful as it saves people ton of time to actually search for something within a file. Whether that be a really large file such as a text document which includes 300 pages worth of text book material or something even more paramount, using regular expression can seek out matching examples in no time. No wonder programmers use regular expression in their software code to take the advantages of the regular expression resourcefulness.
I’m writing this piece to confess that I’m having a really fun time in learning regular expression. To tell the truth, I’m only starting to learn regular expression about 3 days or so ago. Only 3 days or so? Although within and in between such a short duration, I was already too satisfied with knowing how to work with basic regular expression. Once, I knew the basic rules and meta-characters of regular expression, the mysterious, magical regular expression codes I had seen from time to time in software codes shed their mysteriousness and magic. Now, even though the encounters with regular expression might not be so mysterious and magical anymore, regular expression is even more interesting than it once was. How come? Once, I understood how to use basic regular expression, I felt the power of it! It was like a regular human being who suddenly knew that he or she got so much more power, thus greater responsibilities awaited. I’m feeling it! Oh, the power!
Anyhow, I have to thank the book with the title “Mastering Regular Expressions” (third edition) by Jeffrey E. F. Fried, because without this book regular expression would continue to elude me as if it was a supernatural thing which reserved only for superman and superwoman. Only five percent into the book, and now I’m able to write regular expressions that have the same level of difficulty as the regular expressions (codes) that I had mentioned earlier. I hope I can get much better at regular expression sometime soon, and once I get good at it I will write a lot knowhow articles on it. I use Quora.com to ask for help when I get stuck with regular expression, and so you can definitely meet me there if you’re too into regular expression. Knowing another great place for asking regular expression related questions? You can definitely tell me about such online place in the comment section which locates beneath this blog post.
- Change UTF-8 spaces to RegEx-able spaces (Ruby) (stackoverflow.com)
- Regex Of The Dead – Shoot Zombies By Your Regular Expressions (asiajin.com)
- Regular expressions and queries (daniweb.com)
- python regular expression repeating pattern match (stackoverflow.com)
- Too lazy to write Regular Expressions? (laktek.com)
- How to disambiguate symbolic regular expressions (cs.stackexchange.com)
- What regular expressions can I use in c++,using regex, to parse separators,operators,identifiers, and real numbers? (stackoverflow.com)
- New tutorial: Regular expressions (nofluffjuststuff.com)
- DevJuice: Regular Expressions Cookbook enters 2nd edition (tuaw.com)
- 8 Regular Expressions You Should Know (larryullman.com)