I have a list of IP addresses as follows (pulled from API):
<code>$IPs = @(
1.1.1.1-1.1.1.9,
5.5.5.1-5.5.5.3,
8.2.2.2-8.2.2.3
)
</code>
<code>$IPs = @(
1.1.1.1-1.1.1.9,
5.5.5.1-5.5.5.3,
8.2.2.2-8.2.2.3
)
</code>
$IPs = @(
1.1.1.1-1.1.1.9,
5.5.5.1-5.5.5.3,
8.2.2.2-8.2.2.3
)
How can I separate these ranges so I can use a function I already have built to build a list of all these IPs.
For instance, the separation I want would be something like $IP.start and $IP.end to look like this when $IP is called
start | end |
---|---|
1.1.1.1 | 1.1.1.9 |
5.5.5.1 | 5.5.5.3 |
8.2.2.2 | 8.2.2.3 |