I am trying to figure out how to use Regex in looking for a comma. I have a form where A usser will submit information seperated by a comma and I need to verify there is not a comma at the end, or mult comma together, etc.
I tried this, ^(w+)(,s*w+)*$
, however it did not work because it failed when I added more than 1 word within a , bracket.
Invalid: hello,,,,,,
Invalid: hello, world, , how, are, you
Invalid: hello, world,
Valid: Hello, World
Valid: Hello, World, how are you, doing, today
Valid: .5 cups, 1.5 cups