Guest User

Untitled

a guest
Aug 16th, 2022
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. const data = `1.52.0.0 -- 1.55.255.255
  2. 14.0.16.0 -- 14.0.31.255
  3. 123.15.0.1 -- 123.15.0.255`
  4.  
  5. let result = '';
  6. data.split('\n').map((item, index) => {
  7. const ips = item.split(' -- ');
  8. result += `
  9. edit ${index+1}
  10. set start-ip ${ips[0]}
  11. set end-ip ${ips[1]}
  12. next
  13. `
  14. });
  15. console.log(result);
Advertisement
Add Comment
Please, Sign In to add comment