I would like to capture dynamic gateway IP populated in a memo to a text box. How can I do it with either wildcards or capture the whole line of gateway that starts with "Gateway: 10.127.*.*" and get the gateway IP to the text box.
Here is the example of memo text already captured:
Description: Microsoft Hosted Network Virtual Adapter
HW Address Length: 6
HWAddress: E0:2A:82:F9:B2:3E
Index: 32
Type: 71
CurrentIPAddress:
IP Addresses: 192.168.48.1/255.255.255.0
Gateway: 0.0.0.0/255.255.255.255
Name: {22712B8F-5E3A-48D4-8C0D-771708BF0305}
Description: HUAWEI Mobile Connect - Network Card
HW Address Length: 6
HWAddress: 0C:5B:8F:27:9A:64
Index: 4
Type: 243
CurrentIPAddress:
IP Addresses: 10.127.144.193/255.255.255.252
Gateway: 10.127.144.194/255.255.255.255
EDIT: (from Comment)
I:= Pos('Gateway: 10.127.', Memo1.Text);
if I > 0 then begin
L := SendMessage(Memo1.Handle, EM_LINEFROMCHAR, (intTostr(1));
edit1.Text:=(intTostr(L));