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