It's pretty hard to read, but I will explain it.
/^(?:\d+)(?:(?:\d+)|(?:(?:,\d+)?))+(?:\.\d+)?$/
Everyone ?: Should simply explicitly indicate the regex engine "Do not record the next group matched by this pair."
The simplified version will be
/^(\d+)((\d+)|((,\d+)?))+(\.\d+)?$/
But he would capture many suitable groups for no reason, so I deleted them
source share