Advertisement
diela33

Untitled

Apr 2nd, 2023
583
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function solve(input) {
  2.     let str = input.shift();
  3.     let patter = new RegExp('[@#]+(?<color>[a-z]{3,))[@#]+[^a-zA-Z0-9]*\/?<count>[0-9]+)\/+', 'g')
  4.     let match = str.match(patter)
  5.     let copu = match;
  6.     for (let match of copu) {
  7.         let curent = match;
  8.         let infff = patter.exec(match);
  9.         console.log(infff);
  10.     }
  11. }
  12. solve([
  13.     '@@@@green@*/10/@yel0w@*26*#red#####//8//@limon*@*23*@@@red#*/%^&/6/@gree_een@/notnumber/###purple@@@@@*$%^&*/5/'
  14. ]
  15. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement