better regex for capturing parametrized strings