Get ip separately

my log files got two ip src-ip:, dest-ip:, currently the regex get two ip, if i want to retrieve ip address of src-ip(in this case, 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 and

I expect to get ip of source-ip

In JavaScript this should match ‘’:

const reg = new RegExp(/(src-\w{1,6})(:)(\d.{1,14})/)
'src-ip: dest-ip:'.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:"
//length: 4