![]() ![]() PatternLink = pile(HTML_A_HREF_TAG_PATTERN) Private static final String HTML_A_HREF_TAG_PATTERN = Private static final String HTML_A_TAG_PATTERN = "(?i)] )>(. ?)" ( ) # can't contains one single quotes, double quotes ">" '*' # allow string with single quotes enclosed - 'string' "(*") # allow string with double quotes enclosed - "string" \s*=\s* # allows spaces on either side of the equal sign, ] # anything except (">"), at least one character Later get the “link” from above extracted value – Result : Įxtract Link From A tag Regular Expression Pattern. ![]() First get the “value” from a tag – Result : a href='' target='_blank'.For example, to get the link from following content : In this tutorial, we will show you how to extract hyperlink from a HTML page.
0 Comments
Leave a Reply. |