How do I split a field in a pipeline?
Best Answer
-
(the edit: button isnt working for me? so making an expanded post)
One way would be to use the REGEX extract and for the REGEX use something similar to (?\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}):(?\d{1,5}) (there are other ways to do this obviously which are more strrict/validating, but this should do fine for most)Also you could use a split function on eval.
name|value expression:
ipaddress | nameOfCombinedField.split(:)[0]
port | nameOfCombinedField.split(:)[1]0
Answers
-
Use the Regex Extract function:
(?<ip>[^:]+):(?<port>\d+)
0 -
(the edit: button isnt working for me? so making an expanded post)
One way would be to use the REGEX extract and for the REGEX use something similar to (?\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3}):(?\d{1,5}) (there are other ways to do this obviously which are more strrict/validating, but this should do fine for most)Also you could use a split function on eval.
name|value expression:
ipaddress | nameOfCombinedField.split(:)[0]
port | nameOfCombinedField.split(:)[1]0 -
The Eval function was exactly what I needed.
0