extract regexp

- Cache regex
- Replace " with '
- Change nano definition to be within 'fn'
Merge pull request #2 from OnePrism/master

extract regex