Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function employee(data) {
- let n = data.shift();
- let path = /([A-Z][a-z]{2,} [A-Z][a-z]{2,})#+((([A-Z][a-z]+)&([A-Z][a-z]+)&([A-Z][a-z]+))|([A-Z][a-z]+)|(([A-Z][a-z]+)&([A-Z][a-z]+)))\d{2}([A-Z]\w+ (Ltd.|JSC))/;
- let result = [];
- for (let i = 0; i < n; i++) {
- let match = path.exec(data[i]);
- result.push(match);
- }
- for (let element of result) {
- if (element !== null) {
- let job = (element[2]).split('&').join(' ');
- console.log(`${element[1]} is ${(job)} at ${element[11]}`);
- }
- }
- }
Add Comment
Please, Sign In to add comment