Think you'll need the parse function as seen here:
and a handful of regex:
Next step...write the regex or (alternatively) bribe someone else to write it. I've always had more luck with the second option.
Can any regex gurus confirm if either of these are correct?