realbasic-nug
[Top] [All Lists]

Re: RegEx question

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: RegEx question
From: Tom Russell <linuxrox at stny dot rr dot com>
Date: Thu, 30 Aug 2007 19:54:38 -0400
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <46D74652 dot 4070705 at stny dot rr dot com> <10AB228E-EC8D-4715-A717-38A70184D08D at seedit dot info> <46D755E6 dot 4020203 at stny dot rr dot com> <E2AA9F8A-E1B8-43BE-99AB-7EA9DA96CEFA at seedit dot info>
Sven E Olsson wrote:
> On 2007-08-31, at 01:42, Tom Russell wrote:
>
>   
>> That one makes sense, a nightmare with the quotes though!
>>     
>
>
> ???
> What nightmare?
>
> href=["]+...+["]
>
> In this picture you see the RegEx in work ( the red color )
> http://www.seedit.info/rb/hrefregex.png
>
> If you want remove the quote and href=, use Replaceall .. ??
>
> Sven E
>
>
>
>
>
>   
>> Sven E Olsson wrote:
>>     
>>> Links could looks like this:
>>> <a class="blue" href="http://www.seedit.info";>
>>> <a href="http://www.seedit.info"; title="Visit seedit.info">
>>>
>>> There is also examples with Eventhandlers, so you could not search to
>>> the last ">"
>>>
>>>
>>> The only that is safe looks to be: href="http://www.seedit.info"; and
>>> "href=" must be included, because the rest could just be text like:
>>> <a href="http://www.seedit.info";>www.seedit.info</a>
>>>
>>> This return: href="http://www.seedit.info"; - and then remove "href="
>>> href=["]+...+["]
>>>
>>> ---------
>>> Sven E
>>>
>>> On 2007-08-31, at 00:36, Tom Russell wrote:
>>>
>>>
>>>       
>>>> I need to parse some info from a web page but not sure how to regEx
>>>> it.
>>>>
>>>> Example would be:
>>>>
>>>> href="http://myworld.ebay.com/xxxxxxxxx/";>
>>>>
>>>> But I only need the stuff in the quotes.
>>>>
>>>> I assume my search pattern would be something like:
>>>> rg.SearchPattern="href="http:(\D+)>"
>>>>
>>>> Would this be correct?
>>>>
>>>> Thanks,
>>>>
>>>> Tom
>>>>
>>>>
>>>>
>>>>         
>
> _______________________________________________
> Unsubscribe or switch delivery mode:
> <http://www.realsoftware.com/support/listmanager/>
>
> Search the archives:
> <http://support.realsoftware.com/listarchives/lists.html>
>
>
>   
I meant I cant out this:

rg.SearchPattern = href=["]+...+["]

in the ide, syntax error. Im trying to wrap the quotes now to use it.

Thanks,

Tom
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>