on 05-07-2010 12:59 PM
Hi Experts,
I am not java expert, can anyone give me user defined function for getting last string in the line.
for example if the source field is "NEW ARBOUR SQUARE" i want to pass to target field only last string that is "SQUARE"
please help me out of this.
Kind Regards.
Praveen.
Thanks Ravikanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You don't even need a UDF for this. In the graphical editor look for the standard functions and once you do a scroll over on 'text functions; you will find what you are looking for.
Just a piece of advice, try keeping UDF's to minimum unless really required or it is complicated without it.
regards
You can try this:
String lastWord = line.substring(line.lastIndexOf(' ') + 1);
Regards,
ravi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.