https://blog.stackademic.com/mastering-pattern-matching-in-javascript-unveiling-the-magic-of-regular-expressions-e5153ca5df74