Skip to content

Instantly share code, notes, and snippets.

@alex-ppg
Last active February 3, 2019 20:33
Show Gist options
  • Save alex-ppg/b112c8632583bdf85a3cac91fd9f2bc1 to your computer and use it in GitHub Desktop.
Save alex-ppg/b112c8632583bdf85a3cac91fd9f2bc1 to your computer and use it in GitHub Desktop.
const [sign, num] = mystring.match(/([+-](?=\d{1,2} month))|((?<=[+-])\d{1,2}(?= month))/g)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment