hello all!
I have a sentense of raw data so I want to extract only one field.
raw data's example :
A,B,C,D,E,F,1234567891011,G,H,I,J,1234567891011,K,L,M,N
A,B,C,D,E,F,1234567891011,G,H,I,J,1234567891011,K,L,M,N
A,B,C,D,E,F,1234567891011,G,H,I,J,1234567891011,K,L,M,N
A,B,C,D,E,F,1234567891011,G,H,I,J,1234567891011,K,L,M,N
after example :
A,B,C,D,E,F,1234567891011,G,H,I,J,*,K,L,M,N
A,B,C,D,E,F,1234567891011,G,H,I,J,*,K,L,M,N
A,B,C,D,E,F,1234567891011,G,H,I,J,*,K,L,M,N
A,B,C,D,E,F,1234567891011,G,H,I,J,*,K,L,M,N
I want to change 12th field into a '*'
Please help me. Give me make it 😐
You can try like this
| gentimes start=-1 | eval temp="A,B,C,D,E,F,1234567891011,G,H,I,J,1234567891011,K,L,M,N" | table temp | rename temp as _raw | rex mode=sed "s/^(([^,]*,){11})([^,]*)/\1*/"