Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I need assistance in creating an expression in tMap that if the string starts with "0" or "27" then Replace those characters with "+27"
@Phumla Qwabe ,check the below screenshots.
tmap expression:-
row2.col.substring(0,1).equals("0") ? "+27"+row2.col.substring(1,(row2.col).length()) :
row2.col.substring(0,2).equals("27") ? "+27"+row2.col.substring(2,(row2.col).length()) : "000000"
Thanks,
Manohar
@Phumla Qwabe ,check the below screenshots.
tmap expression:-
row2.col.substring(0,1).equals("0") ? "+27"+row2.col.substring(1,(row2.col).length()) :
row2.col.substring(0,2).equals("27") ? "+27"+row2.col.substring(2,(row2.col).length()) : "000000"
Thanks,
Manohar
lets say on there was also '012 572 3535" and i want to also replace the spaces. so after adding "+2712 572 3535" I want to remove the spaces
row2.col.replaceAll(" ", "") is not working
lets say on there was also '012 572 3535" and i want to also replace the spaces. so after adding "+2712 572 3535" I want to remove the spaces
row2.col.replaceAll(" ", "") is not working
#tMap #regex #expression