Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Regular expressions problem

Status
Not open for further replies.

dafyddg

Programmer
Dec 2, 2003
92
GB
Hi,

I'm not sure if this is the right forum to be posting this in, if not could you please point me in the right direction.

Basically i'm having trouble with layered data and header. (i'm probably using the wrong reminology here as i'm a bit of a noobe in this area).

Below is a simplifcation of the tags

<headeryellow>
<headerfordata>
data

<headerwhite>
<headerfordata>
data
<headerfordata>
data

<headeryellow>
<headerfordata>
data
<headerfordata>
data

<headerwhite>
....

i need to extract the data where the first header is <headeryellow>

I've so far gotten it to return the first value from the <headeryellow>, but never the second one. I assumed that i could do it with some form of repetition but nothing i try seems to work.

I need any pointers that you might be able to give me on how this sort of problem might be dealth with.

Oh and in case your wondering i am using C# regular expressions.

Cheers


 
I've never managed to use that RE to work corectly for complex codes, but i was wondering if your file looks more like an XML structure. If so then the things are easyer. Or you could do with some minor modifications to look like and XML structure.

________
George, M
Searches(faq333-4906),Carts(faq333-4911)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top