How to write a regex for the following pattern in JavaScript:
1|dc35_custom|3;od;CZY;GL|2;ob;BNP;MT|4;sd;ABC;MT|5;ih;DFT;FR|6;oh;AQW;MT|7;ip;CAN;MT|8;op;CAR;MT|9;ec;SMO;GL|10;do;CZT;KU|
where
- the first part
1|dc35_custom|is fixed. - the second part onwards, the pattern repeats 9 times(i.e.
3;od;CZY;GL| 2;ob;BNP;MT|and so on.
The 1st character in it ranges from 2-11 and should not repeat. For example 3 appears in the first pattern, so should not appear again.
|3;od;CZY;GL|2;ob;BNP;MT|.execloop, or by splitting and mapping).1|dc35_custom|3;od;CZY;GL|2;ob;BNP;MT|2;sd;ABC;MT|2;ih;DFT;FR|2;oh;AQW;MT|2;ip;CAN;MT|2;op;CAR;MT|2;ec;SMO;GL|2;do;CZT;KU|matches.