Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Talend-Java string manipulation for Find or Search

Wondering how i can go about manipulating a text string in tmap. In Microsoft Excel, i was able to do the following functions:
Source: last, first (the goal is to put it in the proper format without the blank spaces.
A B C D
1 Source Data Field length search for "," Correct Format
2 last, first 21 10 first last
=LEN(A2) =SEARCH(",",A2) =TRIM(RIGHT(A2,LEN(A2)-SEARCH(",",A2))&" "&LEFT(A2,C2-1))

Does anybody have any suggestion on how i can write this formula in the Talend tmap expression? What is the Java string expression for (Find or Search)? Thanks! abbig
Labels (3)
12 Replies
_AnonymousUser
Specialist III
Specialist III

how to achieve string handling for right trim .
example ---> Laks:ram
result ---> ram
I want to fetch characters after ":"
Anonymous
Not applicable
Author

Hi Laks, I am not sure right trim is the best way to describe this. Basically, what you want to use is the code below (assuming the row is "row1" and the column is "myValue"....
row1.myValue.substring(row1.myValue.indexOf(":")+1) 

This uses the Java String "substring" method and "indexOf" method. We find the position in the String of the ":" char with the "indexOf" method, add 1 to it and use that position to start from with the "substring" method.
_AnonymousUser
Specialist III
Specialist III

Thanks Rhall, It is working perfectly , thanks for the prompt response.