I am… h[a-z]*y (Photo credit: martineno)
Regular folks who have no idea what a piece of software code would look like, they definitely would never have heard of regular expression. Of course, there are people who know something about programming but not really great at it can too know either little or a lot about regular expression. How come regular expression is being used in software code a lot, but some people don’t really have to be a programmer and yet be well versed in regular expression? I think, regular expression is so powerful that it’s being used in programming all the time to cut down workload. Furthermore, regular expression is independent from a specific programming language, thus allowing it to stand on its own two feet. Even though regular expression is unique and powerful, it can still be incorporated into not only different programming languages and tools — but whatever that has the need for it, therefore allowing people who do not have to be in programming field to see the usefulness of regular expression. Thus they (whoever these folks may be) learn regular expression nonetheless.
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.