Home > Back-end >  The characters of [with] js regular MAC
The characters of [with] js regular MAC

Time:02-25

MAC: AB: type AB: type AB: type AB: type AB: type AB. 123121

Could you tell me how to directly use js regular matching characters of AB: type AB: type AB: type AB: type AB: type AB

To solve, thank you

CodePudding user response:

To such effect?
 var STR="MAC: AB: type AB: type AB: type AB: type AB: type AB. 123121 "; 
MAC: (var reg=/^ (. {2} {5}). {2}); . */ig
The console. The log (STR. ReplaceAll (reg, '$1'));
  • Related