Last active
June 10, 2020 13:09
-
-
Save Karasiq/b5eefd6fc9e192c694117086bf8a078e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val file = "/Users/user/Downloads/waves.log" | |
val regex = s"${Regex.quote("http://.wvservices.com:6869")}(/.*)".r.unanchored | |
val result = Source | |
.fromFile(file) | |
.getLines() | |
.collect { case regex(url) ⇒ url } | |
.map(s => "\"" + s + "\"") | |
.toSet | |
.mkString(",\n") | |
println(result) | |
sys.exit(0) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment