Why not use one of the available CLI modules?
In reply to Re: regex help by dHarry in thread regex help by Anonymous Monk