When you use JavaScript a lot you are more or less used to the callback-hell, but i hope you love the benefits of passing functions around as much as i do.
For example when replacing a portion of a string:
"test6test12test".replace(/\d+/g, function(str){ return parseInt(str) * 2; }); |
When doing such things in Java it can be a bit of a hassle, but Lambda-Expressions to the rescue!
Nice code, I didn’t know Matcher can do that
Thank you