extract regex

- Cache regex
- Replace " with '
- Change nano definition to be within 'fn'