Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function solve(string) {
- let regex = /#([A-Za-z]+)/g;
- let matches = [...string.matchAll(regex)];
- let result = matches.map(match => match[1]);
- if (result.length > 0) {
- console.log(result.join('\n'));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement