Skip to main content

[solved] Hello, I have a few events which contain a raw field with multiple [
]'s. I'd like to replace all occurances with " ". I tried in a Eval function: _raw=_raw.replace(/[

]+/, " "). This works for the first occurance, but not the others. I also tried with replaceAll, but that just crossed out the entire field. Is there a simple way to just do a SED like search and replace?

The Mask function is what I'd look at


Hi, thank you. I just tried Mask, but I don't see a way to make it match all instances for the carriage return. It again just replaces the first.


In the Regex field, there are flags on the right side


Enable the g flag for global


ah very nice thank you. This works perfectly for literal strings. But when I put [

] there the output goes completely white :confused:


with global set


without global the first instance is replaced sucessfully


That is strange and shouldn't happen...


just to be sure I copied the raw event in notepad++ to verify the carriage returns; they're there. hmm


oh I know the problem


Try replacing it with € instead of space


Just to see how many it spits out


one should remove the filter with which one identtifeid the multiple carriage retunrs :smile: with the filter gone, it works perfectly! thanks again


Oh lol


You mean there were zero events :grin:


I assumed only _raw was empty afterwards


yup all good now! thanks again!


Reply