Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a field called Name which I am pulling from Salesforce. This field is annotated with a date/time stamp which is fine, but in order for me to use that field as a lookup, I need to completely remove the date/time stamp any space(s) in the end of the string. For example:
the string = somenamehere with spaces2019-10-05 07:01:09
tmap=row3.Name.replaceAll("\\d[:-]*","")
results = somenamehere with spaces
the results above has an extra space - might be hard to see --which I am running out of options on how to get rid of it.
My output file is a txt file with a field separator of a semi colon.
Any suggestions folks on how to setup my RegEx?
Thank you so much.
Your way works better - before i saw this i had everything but . replaceAll(" $", "")
And I was using .trim() which wasn't consistent with some of the names in the file. - Thanks again.