Match all digits but splitted in single characters
.net, c#, regex
Solution
You can use Regex.Matches to get all the matches i.e. digits in your case.
var matches = Regex.Matches("Hello world, '4567' is my number.", "\\d");
foreach(Match match in matches)
Console.WriteLine(match.Value);
Problem
This is my string: Hello world, '4567' is my number. If `/g` (global modifier) was supported in .NET, There was no problem to get what I want, but now, I don't know what to do and need your help. I need match all digits (`4567`) but splitted in single characters. I want it like this: match 1: 4, match 2: 5, match 3: 6, match 4: 7 Thanks, Alireza