Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I can't find a regex model to handle two columns in my dataset.
Example :
RF_
RX_S
AF_G
EJ_
FG_
Expected result (remove the last _) :
RF
RX_S
AF_G
EJ
FG
Thanks for your help!
Hi @Stéphane Barbezier
first case :
"_$"
an underscore at the end of the line.
second case :
"^0(?!\\d+)"
a 0 at the beginning of the line not followed by one digit ore more digit
send me love and Kudos
I have already tried this solution and it doesn't work ! Here is an illustration of my tReplace :
Result: identical, no change
I attach my excel file with the example.
For the second case, I found a solution : tConvertype (integer) sets this automatically
Thank you for your suggestion
use advanced mode and not simple mode, or play with the checkbox global expression and whole word.
https://help.talend.com/r/en-US/7.2/processing/treplace
I had used the advanced mode, but it does not change anything. Maybe underscore is used in the regex models to match a string while I want to match this underscore
Nice and amazing post this one is, thanks for sharing.
I've tested it with advance mode it's working :
replace"_$" by ""
input :
dgg_
ddf_dfdgg
_dgds_dgd
output:
dgg
ddf_dfdgg
_dgds_dgd
you can check in the tReplace component Schema if you have your fields in the output schema
Can you share a screenshot with me? I followed the instructions, but it doesn't work for me, maybe I missed something...
Setting :
Result :