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

Remove Character from the first to #

All,

 

I have used SOAP to connect sharepoint list and stored the data in an XML file.

 

I can see some unwanted characters also combined with the actual data in around 15 columns, say for example

float;#1.00000000000000 -- Need to remove float;#

2505;#Mark, Roy - Need to remove 2505;#

3328;#Ingra, Valere -- Need to remove 3328;#

90;#0 -- Need to remove 90;#

 

what ever come before # and '#'  needs to be removed from those columns.

 

 

 

Labels (4)
2 Replies
kavita02
Contributor
Contributor

Hi @Karthi-Talend ,

what I  could understand from  inline question is you want to remove all the characters before '#' from a column. I guess you can do that using substring() function.

Below is the sample code for the same:

String s = "float;#1.00000000000000";
System.out.println("String After Trimming Characters before # =  "+s.substring(s.indexOf('#')+1)); 

 

output ==>

String After Trimming Characters before # = 1.00000000000000

You can use the same function for any variable in tMap or tJavarow.

TRF
Champion II
Champion II

You may also use a simple regex such as
row1.col1.replaceAll("^.*#", "")