I want to extract complete url from a large text such that the complete url incuding the parameters are needed to be extraxted.
It should support all url format...
Eg of urls
Eg of text:
hi hello howe are you look at my code http://www.stackoverflow.com?adiadajda here we got the answer also check this url www.myspace.in that gives bla bla bla
Extract single url via Kotlin
private fun extractUrl(input: String) =
input
.split(" ")
.firstOrNull { Patterns.WEB_URL.matcher(it).find() }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With