Closed iptton closed 7 months ago
fun isUrlWithPath(input: String): Boolean { val urlPattern = Regex("^https?://[a-zA-Z0-9-]+(\\\\.[a-zA-Z]{2,})+(/[a-zA-Z0-9-._~:/?#[\\\\]@!\$&'()*+,;=%]*)?\\\$") return urlPattern.matches(input) }
typo?
"https://example.com/path/to/resource?query=param#fragment" 是通过不了这个正则的,这个方法会在 url 后添加 "/"
应该是,来 PR?
typo?
"https://example.com/path/to/resource?query=param#fragment" 是通过不了这个正则的,这个方法会在 url 后添加 "/"