This project has moved and is read-only. For the latest updates, please go here.

How to wildcard or replace 4 characters

Topics: Developer Forum, User Forum
Feb 10, 2011 at 9:59 AM


I have the following which works for most of my products, however I have just come across a problem and hope someone can advise

this is the code I am fetching and I am trying to extract just the numerical digits 10.00

<span class="price" id="product-price-4965">£10.00</span>

the problem is the four numerical digits which follow product-price-    change for every product

this is the code I was trying to use

PricePath = "//span[@class=""price""]"
Dim PriceNodes As HtmlNodeCollection = GetNodes(oHTMLDocument, PricePath)
ReturnPrice = PriceNodes(0).InnerText
ReturnPrice = ReturnPrice.Replace("id=""product-price-****""", "")
ReturnPrice = ReturnPrice.Replace("#163;", "")
ReturnPrice = ExtractNumbers(ReturnPrice)

So I really need a way to either wildcard the numerical digits or find another way to get to the actual price.

hope you can advise.