http://www.perlmonks.org?node_id=990431


in reply to regular expression for the address

As a first step I would replace the quoted fields with some placeholder. (Make sure to use a non-greedy regexp.) Afterwards you can do a simple '$nice_value = (split q{,}, $var)[11]'.

This seems to be some CSV-like record. Why not use Text::CSV or some other parser module and let it worry about the quoting/escaping?

code is untested, written from the top of my head