LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Regular expressions

I've been working with some html and am trying to use regular
expressions to get a value. Here is what I'm looking for
"handStatus[0] = '(I need this data)';"

I need to find the part that says I need this data, the () are not part
of the string but the ' are. This is what I've tried, but I've never
really worked with Regexp, could somebody tell me what I need to fix?

Set RegEx = New RegExp
anyStr = myIE.document.body.innerText
RegEx.Pattern = "handStatus[0] = '(\w)';"
RegEx.IgnoreCase = True
RegEx.Global = True ' Set global applicability.
Set match = RegEx.Execute(anyStr) ' Execute search.
MsgBox (match.Value)

Thanks

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Get rid of with regular expressions Howdy Excel Discussion (Misc queries) 1 January 18th 10 07:42 PM
Regular expressions in VB FiluDlidu Excel Discussion (Misc queries) 4 March 21st 08 01:10 AM
Regular expressions in Excel? a Excel Programming 8 March 4th 05 05:29 AM
Regular Expressions in VBA? Rob[_23_] Excel Programming 13 February 10th 05 05:34 AM
VBA and Regular expressions Friedrich Muecke Excel Programming 3 October 3rd 03 01:46 AM


All times are GMT +1. The time now is 03:14 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"