A Regex Implementation in 150 lines of Scala