View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
ryguy7272[_2_] ryguy7272[_2_] is offline
external usenet poster
 
Posts: 56
Default Find a Pattern and Parse Text

On Aug 20, 4:20*pm, Ron Rosenfeld wrote:
On Fri, 20 Aug 2010 12:44:26 -0700 (PDT), ryguy7272

wrote:
Now, my_var is a HUGE string. *It is supposed to have everything from
the URL. *If I go to View Source on my web browser, well, that’s the
‘my_var’


Post from a few lines before, through a few lines after, the segment
that you wish to extract.


This is pretty much what I’m searching for:

Lines Befo
<tr class="ms-alternating"
<td class="ms-vb-icon"
<a tabIndex="-1" onclick="return
DispEx(this,event,'TRUE','FALSE','TRUE','SharePoin t.OpenDocuments.
3','0','SharePoint.OpenDocuments','','','11','11', '0','1','0x400001f07fff1bff')"
href="/sites/P/SharedDoc/8834310G10X09999.xls"
<img title="8834310G10X09999.xls
Checked Out To: COLE, TIMMY" alt="8834310G10X09999.xls
Checked Out To: COLE, TIMMY" src="/_layouts/images/icxls.gif"
border="0" complete="complete"/

Line After:
<td height="100%" class="ms-vb-title"

I want to extract this, and pop it into a MsgBox:
8834310G10X09999.xls
Checked Out To: COLE, TIMMY

There’s always a hard return after the .xls

One HUGE string should be in he
my_var = IE.document.body.innerHTML

Then, I want to look for the name of the Excel file and the name of
the person, in the 'my_var'

Does this make sense?