Split Href Tags

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • RdKodes
    New Member
    • Mar 2012
    • 3

    Split Href Tags

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <!--NewPage-->
    <HTML>
    <HEAD>
    <meta name="collection" content="exclude">
    
    <!-- Generated by javadoc (build 1.4.2-rc) on Fri Jun 13 00:13:32 PDT 2003 -->
    <TITLE>
    All Classes (Java 2 Platform SE v1.4.2)
    </TITLE>
    
    
    <LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
    
    
    </HEAD>
    
    <BODY BGCOLOR="white">
    <FONT size="+1" CLASS="FrameHeadingFont">
    <B>All Classes</B></FONT>
    <BR>
    
    <TABLE BORDER="0" WIDTH="100%" SUMMARY="">
    <TR>
    <TD NOWRAP><FONT CLASS="FrameItemFont"><A HREF="org/omg/CORBA/ARG_IN.html" title="interface in org.omg.CORBA" target="classFrame"><I>ARG_IN</I></A>
    <BR>
    <A HREF="org/omg/CORBA/ARG_INOUT.html" title="interface in org.omg.CORBA" target="classFrame"><I>ARG_INOUT</I></A>
    <BR>
    <A HREF="org/omg/CORBA/ARG_OUT.html" title="interface in org.omg.CORBA" target="classFrame"><I>ARG_OUT</I></A>
    <BR>


    From the above HTML code, I would want to extract "org/omg/CORBA/ARG_OUT.html" (All the Href Links).

    How do I do that using Split and Simple RegEx?
    Last edited by numberwhun; Mar 26 '12, 04:04 AM. Reason: Please use code tags!
  • numberwhun
    Recognized Expert Moderator Specialist
    • May 2007
    • 3467

    #2
    When you want to do something in Perl, its a good idea to look for a module that has the functionality you are looking for. CPAN is the place to look for Perl modules.

    For this, you may want to look at the HTML::simplePar se module.

    Regards,

    Jeff

    Comment

    Working...