Hey guys,
I got a problem using Regex with VBA.
From the following source code, I want the stuff in color to be submatched and the entire construct to be the match.
Now my pattern looks like this:
What is incorrect?
I know this is a bit of a mess, but maybe there is a tiny mistake and I dont see it.
Help would be greatly appreciated.
I got a problem using Regex with VBA.
From the following source code, I want the stuff in color to be submatched and the entire construct to be the match.
Code:
<td class="p">
[COLOR="Red"]Highschool[/COLOR], [COLOR="#ffa500"]123456[/COLOR] [COLOR="Red"]New York[/COLOR] </td>
</tr>
<tr background="../../images/transpbg.gif">
<td colspan="2" bgcolor="#FEA700"><img src="../../images/transparent.gif" width="1" height="2"></td>
</tr>
<tr valign = "middle"><td><a href="[COLOR="#ff0000"]/9720500[/COLOR]"><img src="../../icons/icon_homepage.gif" width="24" height="24" alt="Zur Homepage" title="Zur Homepage" border="0"></a>
<a href="[COLOR="#ff0000"]einzelergebnis.html?Id=9720500&treffer=2&auswahl_1=0&auswahl_2=0&auswahl_3=0&suchtext=&kategorie=®ion=de&trefferzahlauswahl=alle&trefferzahl=10412&list_anfang=0&sort=[/COLOR]"><img src="../../icons/icon_info.gif" width="24" height="24" alt="Information" title="Information" border="0"></a>
</td>
Now my pattern looks like this:
Code:
.Pattern = "<td class=.*?>[COLOR="#ff0000"](.*?)[/COLOR], [COLOR="DarkOrange"](\d+)[/COLOR] [COLOR="#ff0000"](.*?)[/COLOR]</td>.*?<tr valign.*?><td><a href=.*?[COLOR="#ff0000"](\\\d+)[/COLOR]" _
& "<img src=.*?<a href=[COLOR="Red"](.*?)[/COLOR]<img src=.*?</td>"
What is incorrect?
I know this is a bit of a mess, but maybe there is a tiny mistake and I dont see it.
Help would be greatly appreciated.
Last edited: