https://kotlinlang.org logo
#announcements
Title
# announcements
v

valerie.turlington

03/28/2018, 5:19 PM
Copy code
fun getYear(): String? {
    for (node in childNodes) {
        val matcher = yearPattern.matcher(node.attr("href").trim())
        if (matcher.find()) {
            return matcher.group("year")
        }
    }
    return null
}
Is there a more concise way to do this via collection functions?