- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
zacksoft
Contributor
09-18-2018
03:19 AM
My field name is 'fileName' and the values it contains are like this:
PVOLFEPCL-00515+Berger+Profile+Settings.docx
Intake3++B2N+Lan+07492018.xlsm
I want it to be like this,
PVOLFEPCL-00515 Berger Profile Settings.docx
Intake3 B2N Lan 07492018.xlsm
The ''+" has to be replaced by Space .
I tried the following , but it doesn't work:
host="*evilcorp*.fantasy.com" "affirative"
| rex field=_raw "^[^&\n]*&\w+=(?P<fileName>[^ ]+)(?:[^ \n]* ){3}(?P<ttr>.+)"
| table userid fileName ttr
| replace "+" WITH "" IN fileName
1 Solution
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

harsmarvania57
Ultra Champion
09-18-2018
06:28 AM
Hi @zacksoft,
Please try below query.
<yourBaseQuery>
| rex mode=sed field=<fieldname> "s/([^\+])(?:\++)/\1 /g"
Here is run anywhere search which is generating correct ouput
| makeresults | eval testfield="PVOLFEPCL-00515+Berger+Profile+Settings.docx"
| append [ makeresults | eval testfield="Intake3++B2N+Lan+07492018.xlsm" ]
| rex mode=sed field=testfield "s/([^\+])(?:\++)/\1 /g"
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

harsmarvania57
Ultra Champion
09-18-2018
06:28 AM
Hi @zacksoft,
Please try below query.
<yourBaseQuery>
| rex mode=sed field=<fieldname> "s/([^\+])(?:\++)/\1 /g"
Here is run anywhere search which is generating correct ouput
| makeresults | eval testfield="PVOLFEPCL-00515+Berger+Profile+Settings.docx"
| append [ makeresults | eval testfield="Intake3++B2N+Lan+07492018.xlsm" ]
| rex mode=sed field=testfield "s/([^\+])(?:\++)/\1 /g"
- Mark as New
- Bookmark Message
- Subscribe to Message
- Mute Message
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

harishalipaka
Motivator
09-18-2018
04:32 AM
hi @zacksoft
try this |makeresults |eval hari="Intake3++B2N+Lan+07492018.xlsm" |table hari | rex field=hari mode=sed "s/\+/ /g"
if it is helped accept as answer
Thanks
Harish
Harish
