11223342124 11223342124 - 1 year ago 132
Javascript Question

Matrix validation format

I am making page for matrix multiplication and I need to validate those matrices. Currently I have regex that accepts this format:

but it should accept this as well:


What should I do? How it can match single array and group of them too?

Answer Source

I assume you want something like this:


To match all these:


Regex 101 here: https://regex101.com/r/tsS0G3/3

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download