Skip to main content
Solved

StringReplacer RegEx duplicates output (bug?)


Forum|alt.badge.img

Hi all,

 

 

I have something weird going on in my StringReplacer.

E.g. a simple string goes in.

 

StringReplacer settings:

 

RegEx captures whole string in capture group 1, then as a replacement I use capture group 1, followed by the string "finished"

 

 

In the output the string "finished" is somehow duplicated.

 

Magic / bug / am I doing something wrong?

 

Cheers,

 

Ed

 

Best answer by ebygomm

I'd try altering your regex to (.+) - one or more rather than zero or more

View original
Did this help you find an answer to your question?

3 replies

ebygomm
Influencer
Forum|alt.badge.img+38
  • Influencer
  • Best Answer
  • February 3, 2020

I'd try altering your regex to (.+) - one or more rather than zero or more


Forum|alt.badge.img
  • Author
  • February 3, 2020
ebygomm wrote:

I'd try altering your regex to (.+) - one or more rather than zero or more

That worked, thank you.

 

 

But why? I don't get it.

ebygomm
Influencer
Forum|alt.badge.img+38
  • Influencer
  • February 3, 2020
edhere wrote:

That worked, thank you.

 

 

But why? I don't get it.

Each occurrence of the match is replaced, since your regex matched with nothing, the nothing also got replaced with nothing and the text specified


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings