Refer:stackoverflow.com/questions/7…

The requirement is as follows, there is a number “FFEECC”, you want the cut to be of the form [“FF”, “EE”, CC]

The following provides a possible implementation

"FFEECC".match(/. / g {1, 2});
//["FF", "EE", "CC"]
Copy the code