Forum Discussion

FlyKick's avatar
FlyKick
Helper II
6 years ago
Solved

Extract Text Between Two Delimiters Only If The Delimiter Exists

Gday All,   I have a column with IP addresses in varying formats. Some are correct but some exist between two [ ] brackets. E.g. 111.111.111.111 1111:1111:1111:1111:1111:1111:1111:1111 [111.111...
  • judspud's avatar
    judspud
    6 years ago

    Hi FlyKick 

     

    Please try the following formula as a custom column within Query Editor. You will need to change [IP] to your column name.

     

    if Text.Contains([IP],"[") then Text.BetweenDelimiters([IP], "[", "]") as text else [IP]

     

    Please mark this as a solution if it provides the data you require.

     

    Thanks,

    George