Need help with a regular expression!

T

thedebugger

Hi David,

You need to use this RegEx

<([map][map]*)[^>]*>(.*?)</\1>

Try this, might be usefull. If not then keep your string in one line then
search with above regex.

Regards
Sachin Korgaonkar
 
D

David Hearn

I am trying to use RegEx.Match to locate some text in an HTML file. I am
trying to find everything between <map> files so that I can grab the
coordinates. The map files looks like this:

<map name="Map4">
<area shape="rect" coords="160,158,443,163" href="#">
<area shape="rect" coords="161,166,442,171" href="#">
<area shape="rect" coords="160,184,433,304" href="#">
<area shape="rect" coords="160,314,434,446" href="#">
<area shape="rect" coords="160,455,435,564" href="#">
</map>

So I need a regular expression to find <map {everything in between} </map>

Can anyone help me with this?

Thanks in advance!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top