URL extraction method

xiaoxiao2021-03-06  105

Public static arraylist getlinks (string htmlcontent) {match mmatch; arraylist amatch = new arraylist (); mmatch = regex.match (htmlcontent, "href // s * = // s * (?: /" (? <1> [ ^ / "| ^ / '] *) /" | /' (? <1> [^ / '] *) /' | (? <1> [^> | ^] *) ", regexoptions.ignorecase | Regexoptions.compiled; while (mmatch.success) {avch.add (mmatch.groups [1] .tostring ()); mmatch = mmatch.nextmatch ();} return avatch;}

转载请注明原文地址:https://www.9cbs.com/read-126748.html

New Post(0)