If the string contains any characters besides a number or the comma that separates it from the other character the function should return "invalid input", if they're all numbers it should output "great job"
a,4,3,@
= "invalid input"...
1,4,6,5
= "great job" <===returned from function
I'm trying to learn about regex but if you could do it using another method that's ok. I'm interested in how you would go about solving it. I couldn't find an answer online my self. I searched. I know that d
(regex) is for digits but I just don't now how to apply it for this case.