Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Internet Control: search HTML of displayed page

Posted on 2004-03-29
1
Medium Priority
?
136 Views
Last Modified: 2010-05-02
How do I search the HTML of a loaded page for a certain string?

I'm trying to find "of about xxx" where XXX is some number.  I'd like that number.  Regex maybe?

Thanks,
-sam
0
Comment
Question by:samsonite1023
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 39

Accepted Solution

by:
appari earned 200 total points
ID: 10711597
you can try something like this, get the html of the page displayed in to a string and search for the position of the string "of about" starting from that position + 9, search for a space and extract the string in between the two positions.

eample

dim strBody as string
dim strNum as string
dim intStart as integer, intEnd as integer

strBody = webbrowser1.document.body.innerHTML
intStart = instr(strBody,"of about")
if intStart <>0 then
      intEnd= instr(intStart +9, strbody, " ")
      strNum = mid(strBody,intStart+9,intEnd)
       msgbox strNum
else
      msgbox "String not found"
endif
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question