473,396 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

[Regex]Strange pattern?

Hi,

I'm trying to parse a <table></table> combination out of a HTML string.
Based to my own regex knowledge I defined the pattern as

Dim strTablePattern
strTablePattern = "<table someUniqueAttributes>(.*\r)*?</table>"

to get the first table out of

<table someUniqueAttributes>
<tr>
<td>
.....
</table>
<table>
....
</table>
However, if I apply it to the HTML string I get no matches.
Set HttpObj = Server.CreateObject("AspHTTP.Conn")
HTTPObj.Url = "myUrl"
strOrgContent = HTTPObj.GetURL

Set objRegExp = New RegExp

With objRegExp
..Pattern = strTablePattern
..IgnoreCase = False
..Global = True
End With

Set objMatches = objRegExp.Execute(strOrgContent)
If objMatches.Count > 0 Then
For Each expressionmatched in objMatches
Response.Write "<B>" & expressionmatched.Value & "</B> was matched at
position <B>" & expressionmatched.FirstIndex & "</B><BR>"
Next
End If
If I use the very same pattern in a different programming language I get the
expected results. Any ideas?

--
Marcel Stör
www.frightanic.com
Jan 22 '06 #1
0 895

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jéjé | last post by:
Hi, I have a file which contain 1 pair of values by line like: Name1=Value1 = I nned to store these pair of values in a sortedlist. So the result expected for the 2 samples lines is: Key ...
4
by: shonend | last post by:
I am trying to extract the pattern like this : "SUB: some text LOT: one-word" Described, "SUB" and "LOT" are key words; I want those words, everything in between and one word following the...
4
by: sherifffruitfly | last post by:
Hi all, I can't see what's wrong with this regex pattern: private int ParsePageViews(string str) { int ret = 0; string pattern = @"Visits.*\n\s*Total\s\.*\s(? <visits>(\d{3})|(\d,\d{3}))";
2
by: =?Utf-8?B?QWFyb24=?= | last post by:
Hi, I'm having a tricky problem where I want to accept a regular expression pattern from user input but can't get teh escape characters to be prcoessed correctly. If I take the same pattern and...
3
by: eBob.com | last post by:
Is there a regex pattern which will match a VB.Net string? I.E. a regex which matches ... "this is a ""vb.net"" string" (I don't want three matches in this case, I want one.) I've come up...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.