I’ve been working for a while now in a way to compress multiple JS and CSS files in Java. I’ll talk about this in a later post, but there is a particularity that I want to discuss briefly here: Regular Expressions.
Regular Expressions is an extremely powerful tool when you want to do any kind of text processing, like finding multiple JS and CSS files in an HTML document. And since this is exactly what the code I’m using as a starting point does, I had to understand it better – so that I can implement some customizations on top of the original code, to make it fit our needs.
I’ll probably write other posts about this topic, but right now I want at least to share some resources for studying this rather obligatory topic for any real programmer/developer.
The first one is a book:
It is in Portuguese, sorry. But if you happen to speak this language, you can find more information about the book here. This book is very good, I really recommend it! At first, I found regex to be boring, but this book changed my mind.
There are, of course, plenty of information on this topic available on the internet. You can find those easily on google, but here are some nice links I tend to use when exploring the subject a little more, to easy your life ;):
- Regular-Expressions.info (tutorials and examples)
- Regular Expression Calculator (yes, another one)
Talking again about “that other post on this topic”, do you have any suggestions on what you want to read about? Please leave a comment saying it!
Everyone really should know all the power of the regex. Including me. 🙂
Later i’ll ask you for lend me the book. :p
Nice!! I always have a battle with regex xD
Now I have the tools to win 🙂