- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to replace random substring in path?
SplunkNewbie100
New Member
03-24-2023
01:17 AM
Hi all,
I want to replace random substrings in path:
C:\Users\sjfklsj\Appdata\.... -> C:\Users\---\Appdata\....
C:\Users\aegdfedg\Appdata\.... -> C:\Users\---\Appdata\....
etc..
So I want to remove the random username from the path.
Thank you!
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ITWhisperer

SplunkTrust
03-24-2023
02:30 AM
| rex mode=sed "s/(?<x>Users\\\)(?<random>[^\\\]+)/\\1---/g"
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yuanliu

SplunkTrust
03-25-2023
12:42 AM
