Skip to main content
Solved

StringReplacer does not replace newline

  • September 4, 2025
  • 2 replies
  • 25 views

r_huesken
Contributor
Forum|alt.badge.img+5

StringReplace does not do what I expect (version 2024.2.1.0)

Newlines are not replaced, can someone please point out what I'm doing wrong?

 

 

Best answer by ebygomm

Your regular expression isn’t correct

 

Your test string contains the actual text \n which is what your regex is matching

 

Try using \R

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

ebygomm
Influencer
Forum|alt.badge.img+45
  • Influencer
  • Best Answer
  • September 4, 2025

Your regular expression isn’t correct

 

Your test string contains the actual text \n which is what your regex is matching

 

Try using \R


r_huesken
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • September 4, 2025

Thanks, this helped. Maybe add this tip in the Help for the transformer?