Getting Data In

How to build a regular expression in order to mask password text in props.conf?

caitcait
Explorer

I have the following string in the events and I would like to mask the password text using sedcmd.

Content={"Login":"stuff@stuff.com","Password":"thingsandstuff"}

Does anyone have any thoughts how to build the regex to do this?

Thank you

0 Karma
1 Solution

richgalloway
SplunkTrust
SplunkTrust

Try this

s/("Password":")([^"]+)"/\1XXX"/
---
If this reply helps you, Karma would be appreciated.

View solution in original post

0 Karma

richgalloway
SplunkTrust
SplunkTrust

Try this

s/("Password":")([^"]+)"/\1XXX"/
---
If this reply helps you, Karma would be appreciated.
0 Karma

caitcait
Explorer

works beautifully, thank you!

Get Updates on the Splunk Community!

.conf25 Community Recap

Hello Splunkers, And just like that, .conf25 is in the books! What an incredible few days — full of learning, ...

Splunk App Developers | .conf25 Recap & What’s Next

If you stopped by the Builder Bar at .conf25 this year, thank you! The retro tech beer garden vibes were ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...