I'm a RegEx novice, so I'm hoping someone out there can give me a hint.
I want to find a straightforward way (using RegEx?) to extract a list/array of values that match a pattern from a string.
If source string is "Hello @bob and @mark and @dave", I want to retrieve a list containing "@bob", "@mark" and "@dave" or, even better, "bob", "mark" and "dave" (without the @ symbol).
So far, I have something like this (in C#):
string note = "Hello, @bob and @mark and @dave";
var r = new Regex(@"/(@)\w+/g");
var listOfFound = r.Match(note);
I'm hoping listOfFound will be an array or a List containing the three values.
I could do this with some clever string parsing, but it seems like this should be a piece of cake for RegEx, if I could only come up with the right pattern.
Thanks for any help!