For the regexp part, I posted a similar question a while ago, asked fellow monks how to split a string on spaces, but not those within quots. I learned lots from those replies others kindly offered. Please check all the replies out. From
, you can find all the replies.