Re: Regex problem - please help.

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Jared (VB_Puzzled_VB_at_email.com)
Date: 07/24/04


Date: Sat, 24 Jul 2004 10:15:51 -0500

Krakatioison,
    This one should work, I tested it against the sample you provided. You
may want to include the ignore case option. Let me know how that works out
for you.
Jared

(?:<a\s+href=[\"\'](?<Link>.+?)[\"\'>]+(?<Heading>(\w+))</a>(<(\w+)>)(?<Description>.*)\2)

"Krakatioison" <Krakatioison@huh.com> wrote in message
news:4102750d$1_1@Usenet.com...
> This I already went to... hm..
> I guess there is no one who can fix me with the code, just by looking at
> it.
> K.
>
>
> "Ken Tucker [MVP]" <vb2ae@bellsouth.net> wrote in message
> news:u7ZPIiYcEHA.1152@TK2MSFTNGP09.phx.gbl...
>> Hi,
>>
>> Check out regexlib.org. Has a ability to search for regex and
> link
>> to the regulator a regex tester.
>>
>> http://www.regexlib.com/Default.aspx
>> http://www.regexlib.com/Search.aspx?k=html
>>
>>
>> Ken
>> ---------------------
>> "Krakatioison" <Krakatioison@huh.com> wrote in message
>> news:4102643f$1_1@Usenet.com...
>> My problem is simple, but I spent lot of time playing with regex and I am
>> going nuts.
>>
>> I need to automatically (many times per day) extract HEADING and
>> DESCRIPTION from the html code below?
>>
>>
>> HTML CODE:
>>
>> HEADING<br>DESCRIPTION<br>
>>
>>
>> I am able to get the link already using this regex command:
>> "a.*href\s*=\s*(?:""(?<1>[^""]*)""|(?<1>\S+))"
>>
>> Can someone write REGEX command to get HEADING and DESCRIPTION.
>>
>>
>> Please, it would be really appreciated.
>>
>> K.
>>
>>
>>
>
>



Relevant Pages

  • Regex problem - please help.
    ... but I spent lot of time playing with regex and I am ... DESCRIPTION from the html code below? ... Can someone write REGEX command to get HEADING and DESCRIPTION. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Regex problem - please help.
    ... but I spent lot of time playing with regex and I am ... DESCRIPTION from the html code below? ... Can someone write REGEX command to get HEADING and DESCRIPTION. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Regex problem - please help.
    ... but I spent lot of time playing with regex and I am ... > I need to automatically extract HEADING and ... > DESCRIPTION from the html code below? ... > Can someone write REGEX command to get HEADING and DESCRIPTION. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Newbie needs regex help
    ... Catching the first case with a regex is simple. ... I'm obviously missing something. ... I spent a fair bit of time playing with ... What you're missing is that string `a` doesn't actually contain four- ...
    (comp.lang.python)
  • Re: [PHP] Re: Changing URLs from Relative to Absolute
    ... HTML code to display something on a listings site and tried to find ... That is easy enough and I created a regexp, ... Your regex is gonna get awfully complicated, ...
    (php.general)