dim intDollar as integer
intDollar=strBlah.IndexOf("$")
dim intAfterDollar as integer
intAfterDollar=strBlah.IndexOf("</SPAN>",intDollar)
dim strDollarAmount as string=strBlah.substring(intDollar,
(intAfterDollar-intDollar))

This will get what you want.

On the RegEx front a list like 
http://groups.yahoo.com/group/dotnetregex/
will know the answer though my solution works without it.

On Tue, 08 Feb 2005 05:46:28 -0000, Jamal <[EMAIL PROTECTED]> wrote:
>  
>  But here I am not looking to get only the $ but the string with it, 
>  for example $19.95.
>  
>  How can I parse a string like this :
>  
>  ......<SPAN CLASS="priceRightBNPrice">$15.95</SPAN></TD>......
>  
>  to extract $15.95
>  
>  How can I use a regular expression to extract price from the above 
>  string.
>  
>  thanks
>  
>  --- In [email protected], Charles Carroll 
>  <[EMAIL PROTECTED]> wrote:
>  > IndexOf will help you locate it's exact position.
>  > 
>  > Once you know the position you can use substring to take it apart 
>  from there.
>  > 
>  > dim intDollar as integer
>  > intDollar=strBlah.IndexOf("$")
>  > dim intAfterDollar as integer
>  > intAfterDollar=strBlah.IndexOf(" ",intDollar)
>  > dim strHTML=strBlah.substring(intDollar, (intAfterDollar-intDollar))
>  > 
>  > A regular expression could grab it too but if you don't know regexes
>  > it takes a while to learn.
>  > 
>  > 
>  > 
>  > 
>  > On Mon, 07 Feb 2005 18:50:23 -0000, Jamal <[EMAIL PROTECTED]> wrote:
>  > >  
>  > >  Hi,
>  > >  I have a big string that hold an html page, I want to look for a
>  > >  substring that start with the $ sign and extract it.
>  > >  thanks
>  > >  
>  > >  
>  > >  
>  > >  
>  > >  ________________________________
>  > >  Yahoo! Groups Links
>  > >  
>  > > To visit your group on the web, go to:
>  > > http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
>  > >   
>  > > To unsubscribe from this group, send an email to:
>  > > [EMAIL PROTECTED]
>  > >   
>  > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
>  Service.
>  
>  
>  
>  
>  
>  Yahoo! Groups Sponsor 
>  
> ADVERTISEMENT
>  
>  
>  
>  ________________________________
>  Yahoo! Groups Links
>  
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/
>   
> To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
>   
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/AspNetAnyQuestionIsOk/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to