Extract variables from string.
$ npm install --save romantic
const Romantic = require('romantic')
const romantic = new Romantic()
const result = romantic.match(
'hello <name> <age>',
'hello egoist 21.4'
)
// => {
// name: 'egoist',
// age: '21.4'
// }
// define a custom regex pattern to match variables
const romantic = new Romantic(/your regex/g)
MIT © EGOIST