Relief from Regexes
As most of the readers on this blog know that my sys-admin skills are not on the high side. Well also one thing that I am very poor at is regexes. I know I hold my head in shame in this, I just never used them very much and most of my programming hasn't been in the area of text processing so I have never use them very much.
Most of the time when I run into a regex I can figure out what is going on but when the complex ones come into play I am just flustered.
Well it was easy enough to install and when I called it up I got this
Ok simple enough UI lets test it with a regex that always torments me is extracting dates out of a string.
Here is the one I usually have grief with
that is suppose to extract out a date in this format '10/12/98 22:22:21' so I plug it in and here is what I get
Ok that is neat I can even play around a bit so by clicking the the 'Show Description' checkbox I can see what the regex is trying to do.
I did try one other that came would of come in handy and that is give me the 'Package' name from a full namespace, (this being what ever is after the last set of '::'
So I looked up this '^.*::' and then tried this 'Test::Package::Mine' and got this
Which left me a little confused as I wanted only the end text not all of it, a bug maybe but nothing is in the queue on it. Fortunately there is a 'Show Substitution' checkbox and giving that a quick click I can see that my regex worked as all I see is the 'Mine' in the 'Result from replace:' as I have this
Ok it works fair enough and for simple ones I have a good tool I can use on the fly. I think for the complicated one I will stick with The Regex Coach.