Problem with "ellipse" character and treplace component

Highlighted
Six Stars

Problem with "ellipse" character and treplace component

I think this might be a bug or limitation.  If you have a text file with the following line:

 

LF05.03|91|For nooks…||

 

The delimiter is the pipe "|" and notice there is the win1252 character ellipse "…"

 

When you use the treplace with pattern "^(LF05.+?)\\|$", substitution "$1", it should strip off the ending pipe character, but it does not work with the ellipse character in the file.  It does work if you take the ellipse out.

 

I'm doing some cleanup on a big file and treplace is failing when specific characters are present, such as the ellipse.

 


Accepted Solutions
Six Stars

Re: Problem with "ellipse" character and treplace component

This modified expression will work:

 

^(LF05\\.[^\\n]*)\\|$

 

Note that the problem is that the regex dot "." will not match the ellipse character.  this is a problem to be aware of if your input file is using windows 1252 encoding


All Replies
Six Stars

Re: Problem with "ellipse" character and treplace component

This modified expression will work:

 

^(LF05\\.[^\\n]*)\\|$

 

Note that the problem is that the regex dot "." will not match the ellipse character.  this is a problem to be aware of if your input file is using windows 1252 encoding

What’s New for Talend Spring ’19

Watch the recorded webinar!

Watch Now

Tutorial

Introduction to Talend Open Studio for Data Integration.

Watch

Downloads and Trials

Test drive Talend's enterprise products.

Downloads

Definitive Guide to Data Integration

Practical steps to developing your data integration strategy.

Download