Adding XXXX in a column through logstash

Hi Team,

I have this task where I'm inputing some csv data which contain Accc number, which is 10 digit long. so what i want to do is that before storing it into elasticsearch, I want to change the end 5 digit to X.

so it will look like this

1234567890

changes into

12345xxxxx

I know it can be done. just need a headsup.
do help

Thanks and Regards,
Sagar Mandal

Use mutate

mutate { gsub => [ "someField", "[0-9]{5}$", "xxxxx" ] }

Thanks buddy
I'll try this

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.