Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
I am looking for a RegEx to match links from a webpage source. If you have any code samples it would be appriciated.
Thanks
要匹配href属性值,您可以使用以下方法:
href
final Pattern pattern = Pattern.compile("href=\"(.*+)\""); Matcher matcher = pattern.matcher(html); String link = null; while (matcher.find()) { link = matcher.group(1); Log.i("my.regex", "Found link: " + link); }