Get ip separately

my log files got two ip src-ip:132.23.35.1, dest-ip:10.23.56.1, currently the regex get two ip, if i want to retrieve ip address of src-ip(in this case 132.23.35.1, how to do? thanks

I 'm using regex\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3} to get ip of src-ip, but now i get two ip 132.23.35.1 and 10.23.56.1

I expect to get ip of source-ip 132.23.35.1

In JavaScript this should match ‘src-ip:xxx.xxx.xxx.xxx’:

const reg = new RegExp(/(src-\w{1,6})(:)(\d.{1,14})/)
'src-ip:132.23.35.1 dest-ip:132.23.35.1'.match(reg)
//output array
//0: "src-ip:132.232.353.121"
//1: "src-ip"
//2: ":"
//3: "132.232.353.121"
//groups: undefined
//index: 0
//input: "src-ip:132.232.353.121 ↵dest-ip:132.23.35.1"
//length: 4