Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Reg
ular
Ex
pressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
^(?:[^\r\n,]*[^\r\n\s,]\s*,)+[^\r\n,]+$
/
gm
Input 1
1
New
Invalid, hello,,,,,, Invalid, hello, world, , how, are, you Invalid, hello, world , , how, are, you Valid, hello, world , how, are, you Valid , 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 Valid, .5 cups, 1.5 cups Valid, .5 cups, . Valid,., . .,.,.,.,.,.