Deleting duplicates

  • (2 Pages)
  • +
  • 1
  • 2

18 Replies - 676 Views - Last Post: 27 April 2013 - 08:57 PM Rate Topic: -----

#16 codejunky  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 20
  • Joined: 18-April 13

Re: Deleting duplicates

Posted 27 April 2013 - 02:07 PM

Yeah it's outside my loop... however, without += I get no results.
Everything works great. I assume that the += is why i'm getting no spaces.
However, displayBox.Text = (String.Join(Environment.NewLine, sUniqueMatches));
give me nothing for results...

View Postandrewsw, on 27 April 2013 - 02:01 PM, said:

You don't still have displayBox.Text += .. within a loop do you? It only needs to occur once, without the + sign.

Was This Post Helpful? 0
  • +
  • -

#17 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3175
  • View blog
  • Posts: 10,625
  • Joined: 12-December 12

Re: Deleting duplicates

Posted 27 April 2013 - 02:21 PM

There is a debugging tutorial linked in my signature.
Was This Post Helpful? 0
  • +
  • -

#18 codejunky  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 20
  • Joined: 18-April 13

Re: Deleting duplicates

Posted 27 April 2013 - 03:45 PM

Don't understand why I can't get that to work buy
displayBox.Text += Regex.Replace((String.Join(Environment.NewLine, sUniqueMatches)), @".com|.org|.net", "$&\n");


Works great! Even though I know it's 100% the wrong way to go about it LOL
Was This Post Helpful? 0
  • +
  • -

#19 Skydiver  Icon User is online

  • Code herder
  • member icon

Reputation: 3449
  • View blog
  • Posts: 10,643
  • Joined: 05-May 12

Re: Deleting duplicates

Posted 27 April 2013 - 08:57 PM

Maybe I'm just being particularly dense, but I have to ask.

What is the significance of the Group named by the value page that you use here:
match.Groups[page].Value


when your regular expression:
@"\b[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+(?:[A-Z]{2}|com|org|net|edu|gov|mil|biz|info|mobi|name|aero|asia|jobs|museum)\b"


doesn't seem to have any named groups?

This post has been edited by Skydiver: 27 April 2013 - 08:57 PM

Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2