master maste
New Member
- Reaction score
- 32
I'm currently using regex on some of my webpages, and I'm adding the text to a .txt file on my computer.
I'm currently appending
Everything up to here works perfectly; I'm wondering how to only add the appended text to every 2nd lot.
I want to display the artist with a dash and then the title.
^^Like that, at the moment it does this.
Thanks for any help you may be able to give, I've been googling all night.
Code:
Regex regexObj = new Regex("(?<=<div class=\"item-artist\" style=\"display:none;\">)(.*?)(?=</div>)|((?<=<div class=\"item-title\" style=\"display:none;\">)(.*?)(?=</div>))");
I'm currently appending
Code:
textBox.AppendText(matchResults.Value + " - \r\n");
Everything up to here works perfectly; I'm wondering how to only add the appended text to every 2nd lot.
I want to display the artist with a dash and then the title.
Code:
Artist - Title
Artist - Title
Artist - Title
Artist - Title
^^Like that, at the moment it does this.
Code:
Artist - Title - Artist - Title - Artist - Title - Artist - Title
Thanks for any help you may be able to give, I've been googling all night.