I am trying to get a regex for the following format below. It requires a "Name", any character except empty whitespace or nothing. A pipe sign always, then a list of items comma seperated, which can be any characters. The comma cant have a space after it though (, ).
Name|Item1,Item2,Item3
Below is what I have so far and its matching basically every time.
(.*)|([.*]+(,[\S]+)*)+
Invalids
Name|
Name
|Item1,Item2
|Item1,Item2
Name|Item1, Item2
|