Hello,
I have a situation where in the data have to be extracted from inside a square bracket []. The column doesn't have any pattern. These are some of the values in the column :
abc [xyz-123] nsk
[ahd-246]
uteh[iwyt-798]
[kudgb-3645] jvsux [oikjh-35945] ahfvd [kdytd-2384]
As from the examples above, it doesn't follow any pattern. I just need to extract all the data inside the bracket.
I tried using the expression ".*\[(.*)\].*" (excluding ")
It works for most cases but if the cell contains more than 1 bracket pair, it only picks up one data.
Looking for a solution where in i can extract every data inside any number of square bracket.
Thanks in advance
Solucionado! Ir para Solução.
try the regex tool in tokenize mode.
@Shahas as @apathetichell mentions, Tokenize can be great here! I've added a couple of extra steps in so you don't have to manually click on how many columns to split by.
RegEx: \[.*?\]
Hi, @Shahas
Maybe this way as you want:
1- Formula: Copy the field [Text] to [Parse].
2- RegEx: Remove all characters not in [ ] by regular expression.
(?<=\[)([\w-]+?)\]
3- Text To Columns: Split [Parse] to Columns by "]" .
4- Data Cleansing: Remove all null columns.
******
If it can help you , please mark it as a solution and give a like for more share.
heyy @flying008
The regex which u used provided me with the solution that i was looking for. Thanks
Heyy @BS_THE_ANALYST
This also works. Thanks for your time