This is my first stack message. Hope you can help.
I have several strings i need to break up for use later. Here are a couple of examples of what i mean….
fred-064528-NEEDED
frederic-84728957-NEEDED
sam-028-NEEDED
As you can see above the string lengths vary greatly so regex i believe is the only way to achieve what i want. what i need is the rest of the string after the second hyphen (‘-‘).
i am very weak at regex so any help would be great.
Thanks in advance.
Something like this. It will take anything (except line breaks) after the second ‘-‘ including the ‘-‘ sign.
EDIT: I answered another question which relates to this. Except, it asked for a LINQ solution and my answer was the following which I find pretty clear.
Pimp my LINQ: a learning exercise based upon another post
or
As mentioned in the other SO thread it is not the fastest way of doing this.