I need a regular expression for a list of numbers in a text box with carriage returns and line feeds, but no other characters.
e.g.
1234
5678
5874
3478
I have this:
Regex(@"\d\r\n${0,}?");
… but it is accepting commas when I paste them into my text box:
e.g.
1234,
5678
5874,
3478
Can someone please tell me what I’m doing wrong?
Thanks
Quite a lot is wrong with your Regex =)
Your regex matches the example you have given, because it matches the “8” in the second line.
Use this regex instead: