Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const data = `1.52.0.0 -- 1.55.255.255
- 14.0.16.0 -- 14.0.31.255
- 123.15.0.1 -- 123.15.0.255`
- let result = '';
- data.split('\n').map((item, index) => {
- const ips = item.split(' -- ');
- result += `
- edit ${index+1}
- set start-ip ${ips[0]}
- set end-ip ${ips[1]}
- next
- `
- });
- console.log(result);
Advertisement
Add Comment
Please, Sign In to add comment