Parsing the Registry

I’m trying to retrieve only IPs that begin with 10.10.50 from a specific registry. It appears to be giving me ALL the values instead of the values that contain "10.10.50. See the relevance/ below:

Q: values “TimeServAddressList” whose( it as string contains “10.10.50” ) of key
s “HKEY_LOCAL_MACHINE\SOFTWARE\USPS\DCS” of native registry
A: 10.10.10.40%0010.10.10.41%0010.10.10.42%0010.10.10.43%0010.10.10.44%0010.10.1
0.45%0010.10.10.46%0010.10.10.47%0010.10.10.48%0010.10.10.49%0010.10.10.50%0010.
10.10.51%0010.10.10.52%0010.10.10.53%0010.10.10.54%0010.10.10.55%0010.10.10.56%0
010.10.10.57%0010.10.10.58%0010.10.10.59%0010.10.10.60%0010.10.10.61%0010.10.10.
62%0010.10.10.63%0010.10.10.64%0010.10.10.65%0010.10.10.66%0010.10.10.67%0010.10
.10.68%0010.10.10.69%0010.10.10.70%0010.10.10.71%0010.10.10.72%0010.10.10.73%001
0.10.10.74%0010.10.10.75%0010.10.10.76%0010.10.10.77%0010.10.10.78%0010.10.10.79
%0010.10.10.80%0010.10.10.81%0010.10.10.82%0010.10.10.83%0010.10.10.84%0010.10.1
0.85%0010.10.10.86%0010.10.10.87%0010.10.10.88%0010.10.10.89%0010.10.10.90%0010.
10.10.91%0010.10.10.92%0010.10.10.93%0010.10.10.94%0010.10.10.95%0010.10.10.96%0
010.10.10.97%0010.10.10.98%0010.10.10.99%0010.10.10.100%0010.10.10.101%0010.10.1
0.102%0010.10.10.103%0010.10.10.104%0010.10.10.105%0010.10.10.106%0010.10.10.107
%0010.10.10.108%0010.10.10.109%0010.10.10.110%0010.10.10.111%0010.10.10.112%0010
.10.10.113%0010.10.10.114%0010.10.10.115%0010.10.10.116%0010.10.10.117%0010.10.1
0.118%0010.10.10.119%0010.10.10.120%0010.10.10.121%0010.10.10.122%0010.10.10.123
%0010.10.10.124%0010.10.10.125%0010.10.10.126%0010.10.10.127%0010.10.10.128%0010
.10.10.129%0010.10.10.130%0010.10.10.131%0010.10.10.132%0010.10.10.133%0010.10.1
0.134%0010.10.10.135%0010.10.10.136%0010.10.10.137%0010.10.10.138%0010.10.10.139
%0010.10.10.140%0010.10.10.141%0010.10.10.142%0010.10.10.143%0010.10.10.144%0010
.10.10.145%0010.10.10.146%0010.10.10.147%0010.10.10.148%0010.10.10.149%0010.10.1
0.150%0010.10.10.151%0010.10.10.152%0010.10.10.153%0010.10.10.154%0010.10.10.155
%0010.10.10.156%0010.10.10.157%0010.10.10.158%0010.10.10.159%0010.10.10.160%0010
.10.10.161%0010.10.10.162%0010.10.10.163%0010.10.10.164%0010.10.10.165%0010.10.1
0.166%0010.10.10.167%0010.10.10.168%0010.10.10.169%0010.10.10.170%0010.10.10.171
%0010.10.10.172%0010.10.10.173%0010.10.10.174%0010.10.10.175%0010.10.10.176%0010
.10.10.177%0010.10.10.178%0010.10.10.179%0010.10.10.180%0010.10.10.181%0010.10.1
0.182%0010.10.10.183%0010.10.10.184%0010.10.10.185%0010.10.10.186%0010.10.10.187
%0010.10.10.188%0010.10.10.189%0010.10.10.190%0010.10.10.191%0010.10.10.192%0010
.10.10.193%0010.10.10.194%0010.10.10.195%0010.10.10.196%0010.10.10.197%0010.10.1
0.198%0010.10.10.199%0010.10.10.200%0010.10.10.201%0010.10.10.202%0010.10.10.203
%0010.10.10.204%0010.10.10.205%0010.10.10.206%0010.10.10.207%0010.10.10.208%0010
.10.10.209%0010.10.10.210%0010.10.10.211%0010.10.10.212%0010.10.10.213%0010.10.1
0.214%0010.10.10.215%0010.10.10.216%0010.10.10.217%0010.10.10.218%0010.10.10.219
%0010.10.10.220%0010.10.10.221%0010.10.10.222%0010.10.10.223%0010.10.10.224%0010
.10.10.225%0010.10.10.226%0010.10.10.227%0010.10.10.228%0010.10.10.229%0010.10.1
0.230%0010.10.10.231%0010.10.10.232%0010.10.10.233%0010.10.10.234%0010.10.10.235
%0010.10.10.236%0010.10.10.237%0010.10.10.238%0010.10.10.239%0010.10.10.240%0010
.10.10.241%0010.10.10.242%0010.10.10.243%0010.10.10.244%0010.10.10.245%0010.10.1
0.246%0010.10.10.247%0010.10.10.248%0010.10.10.249%0010.10.10.250%0010.10.15.61%
0010.10.15.62%0010.10.15.63%0010.10.15.64%0010.10.15.65%0010.10.15.66%0010.10.15
.67%0010.10.15.68%0010.10.15.69%0010.10.15.70%0010.10.15.71%0010.10.15.72%0010.1
0.15.73%0010.10.15.74%0010.10.15.75%0010.10.15.76%0010.10.15.77%0010.10.15.78%00
10.10.15.79%0010.10.15.80%0010.10.15.81%0010.10.15.82%0010.10.15.83%0010.10.15.8
4%0010.10.15.85%0010.10.15.86%0010.10.15.87%0010.10.15.88%0010.10.15.89%0010.10.
15.90%0010.10.15.91%0010.10.15.92%0010.10.15.93%0010.10.15.94%0010.10.15.95%0010
.10.15.96%0010.10.15.97%0010.10.15.98%0010.10.15.99%0010.10.15.100%0010.10.15.10
1%0010.10.15.102%0010.10.15.103%0010.10.15.104%0010.10.15.105%0010.10.15.106%001
0.10.15.107%0010.10.15.108%0010.10.15.109%0010.10.15.110%0010.10.15.111%0010.10.
15.112%0010.10.15.113%0010.10.15.114%0010.10.15.115%0010.10.15.116%0010.10.15.11
7%0010.10.15.118%0010.10.15.119%0010.10.15.120%0010.10.40.17%0010.10.40.18%0010.
10.40.23%0010.10.40.24%0010.10.40.25%0010.10.40.26%0010.10.40.27%0010.10.40.28%0
010.10.40.29%0010.10.40.30%0010.10.40.71%0010.10.40.72%0010.10.40.73%0010.10.40.
74%0010.10.40.75%0010.10.40.76%0010.10.40.77%0010.10.40.78%0010.10.40.79%0010.10
.40.80%0010.10.60.61%0010.10.60.62%0010.10.60.63%0010.10.60.64%0010.10.60.65%001
0.10.60.66%0010.10.60.67%0010.10.60.68%0010.10.60.69%0010.10.60.70%0010.10.60.91
%0010.10.60.92%0010.10.60.93%0010.10.60.94%0010.10.60.95%0010.10.60.96%0010.10.6
0.97%0010.10.60.98%0010.10.60.99%0010.10.60.100%0010.10.60.111%0010.10.60.112%00
10.10.60.113%0010.10.60.114%0010.10.60.115%0010.10.60.116%0010.10.60.117%0010.10
.60.118%0010.10.60.119%0010.10.60.120%0010.10.60.121%0010.10.60.122%0010.10.60.1
23%0010.10.60.124%0010.10.60.125%0010.10.60.126%0010.10.60.127%0010.10.60.128%00
10.10.60.129%0010.10.60.130%0010.10.90.22%0010.10.90.206%0010.10.90.207%0010.10.
90.208%0010.10.90.209%0010.10.90.210%0010.10.90.216%0010.10.90.217%0010.10.90.21
8%0010.10.90.219%0010.10.90.220%0010.10.22.101%0010.10.22.102%0010.10.90.101%001
0.10.90.102%0010.10.90.103%0010.10.90.104%0010.10.90.105%0010.10.90.106%0010.10.
90.107%0010.10.90.108%0010.10.90.109%0010.10.90.110%0010.10.90.196%0010.10.90.19
7%0010.10.90.198%0010.10.90.199%0010.10.90.200%0010.10.90.201%0010.10.90.202%001
0.10.90.203%0010.10.90.204%0010.10.90.205%0010.10.90.81%0010.10.90.111%0010.10.9
0.112%0010.10.90.113%0010.10.90.114%0010.10.90.115%0010.10.90.151%0010.10.90.152
%0010.10.90.121%0010.10.90.122%0010.10.90.123%0010.10.90.124%0010.10.90.125%0010
.10.90.236%0010.10.90.91%0010.10.40.171%0010.10.40.172%0010.10.40.173%0010.10.40
.174%0010.10.40.175%0010.10.40.176%0010.10.40.177%0010.10.40.178%0010.10.50.71%0
010.10.50.72%0010.10.50.73%0010.10.50.74%0010.10.50.75%0010.10.50.76%0010.10.50.
77%0010.10.50.78%0010.10.50.79%0010.10.50.80%0010.10.50.81%0010.10.50.82%0010.10
.50.83%0010.10.50.84%0010.10.50.85%0010.10.50.86%0010.10.50.87%0010.10.50.88%001
0.10.50.89%0010.10.50.90%0010.10.50.91%0010.10.50.92%0010.10.50.93%0010.10.50.94
%0010.10.50.95%0010.10.50.96%0010.10.50.97%0010.10.50.98%0010.10.50.99%0010.10.5
0.100%0010.10.50.181%0010.10.50.182%0010.10.50.183%0010.10.50.184%0010.10.50.185
%0010.10.50.186%0010.10.50.187%0010.10.50.188%0010.10.50.189%0010.10.50.190%0010
.10.50.201%0010.10.50.202%0010.10.50.203%0010.10.50.204%0010.10.50.205%0010.10.5
0.206%0010.10.50.207%0010.10.50.208%0010.10.50.209%0010.10.50.210%0010.10.50.211
%0010.10.50.212%0010.10.50.213%0010.10.50.214%0010.10.50.215%0010.10.50.216%0010
.10.90.136%0010.10.90.137%0010.10.90.138%0010.10.90.139%0010.10.90.140%0010.10.9
0.141%0010.10.90.142%0010.10.90.143%0010.10.90.144%0010.10.90.145%0010.10.40.179
%0010.10.40.180%0010.10.40.181%0010.10.40.182%0010.10.40.183%0010.10.40.184%0010
.10.40.185%0010.10.40.186%0010.10.40.187%0010.10.40.188%0010.10.40.189%0010.10.4
0.190%0010.10.90.238%0010.10.50.181%0010.10.50.182%0010.10.50.183%0010.10.50.184
%0010.10.50.185%0010.10.50.186%0010.10.50.187%0010.10.50.188%0010.10.50.189%0010
.10.50.190%0010.10.50.101%0010.10.50.104%0010.10.50.106%0010.10.50.108%0010.10.5
0.110%0010.10.50.111%0010.10.50.112%0010.10.50.113%0010.10.50.114%0010.10.50.115
%0010.10.50.116%0010.10.50.117%0010.10.50.118%0010.10.50.119%0010.10.50.120%0010
.10.50.121%0010.10.50.122%0010.10.50.123%0010.10.50.124%0010.10.50.125%0010.10.5
0.126%0010.10.50.127%0010.10.50.128%0010.10.50.129%0010.10.50.130%0010.10.70.61%
0010.10.70.62%0010.10.70.63%0010.10.70.64%0010.10.70.65%0010.10.70.66%0010.10.70
.67%0010.10.70.68%0010.10.70.69%0010.10.70.70%0010.10.90.71%0010.10.90.72%0010.1
0.90.73%0010.10.90.74%0010.10.90.75%0010.10.90.76%0010.10.90.77%0010.10.90.78%00
10.10.90.79%0010.10.90.80%0010.10.60.221%0056.70.1.160%0010.10.10.6%0056.70.1.17
3%0056.70.1.174%0010.10.60.171%0010.10.60.172%0010.10.60.173%0010.10.6.2%0010.10
.10.138%00%00
T: 153620

The values are listed 1 IP address per line with a hard return at the end of each line. Could this be the issue?

And how do I get the results I need?

Ivy,

Looks like a multi-value? Try this:
Q: substrings separated by "%00" whose (it starts with "10.10.50.") of (it as string ) of values "TimeServAddressList" of keys "HKEY_LOCAL_MACHINE\SOFTWARE\USPS\DCS" of native registry

yay!! That worked. Thanks so much :slight_smile:

1 Like