Community Patterns

Community Library Entry

1

Regular Expression
Created·2018-12-07 05:21
Flavor·ECMAScript (JavaScript)

/
^(\[(\d+|(?:\d*\.\d+))(?:,\s*(\d+|(?:\d*\.\d+)))*\])\s*[\*x]\s*(\[(\d+|(?:\d*\.\d+))(?:,\s*(\d+|(?:\d*\.\d+)))*\])$
/
gm
Open regex in editor

Description

Matches exactly two arrays of number literals separated by a multiplication character, where that multiplication character is either an asterisk or an x, and an array is started with a left square bracket, and whose contents are separated by commas, and which ends with a right square bracket.

Unimportant whitespace is ignored.

Submitted by anonymous