I have some data that look like this:
john, dave, chris
rick, sam, bob
joe, milt, paul
I'm using this regex to match the names:
/(\w.+?)(\r\n|\n|,)/
Which works for the most part, but the file ends abruptly after the last word, meaning the last value doesn't end in \r\n, \n or ,. It ends with EOF. Is there a way to match EOF in regex so I can put it right in that second grouping?