Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a column in a table and some values has back slash / towards end. i want to remove these slash value and retain the rest of text. so lets say i have a text "myjunkdata/", it should give me back "myjunkdata". However below condition is not working.
(StringHandling.RIGHT(row1.CertificateName,1) == "/") ? StringHandling.LEFT(row1.CertificateName,StringHandling.LEN(row1.CertificateName)-1) : row1.CertificateName
example data below
Certified SOA Security Specialist/ Information Security Management Principles Foundation Certificate/ Check Point Certified Security Administrator R77/ Check Point Certified Security Expert R77/ Check Point Managed Security Expert/ Cisco Certified Network Associate Security Cisco Certified Network Professional Security Cisco Certified Internetwork Expert Security Cisco Certified Network Professional Security
Can anyone help?
Can you please try with below one
StringHandling.RIGHT(row1.CertificateName,1).equals("/")? StringHandling.LEFT(row1.CertificateName,StringHandling.LEN(row1.CertificateName)-1) : row1.CertificateName
Hi,
row1.CertificateName.replace("/","")
Good luck
SGV
Not helpful. there are / symbols in the middle area too, which i want to retain. i only want to remove the ones appearing at the end. Thanks!
Can you please try with below one
StringHandling.RIGHT(row1.CertificateName,1).equals("/")? StringHandling.LEFT(row1.CertificateName,StringHandling.LEN(row1.CertificateName)-1) : row1.CertificateName
(row1.CertificateName.lastIndexOf("/") == row1.CertificateName.length()-1)?
row1.CertificateName.subSequence(0, test.length()-1) : row1.CertificateName