Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have input file with telephone numbers in this format (###) ###-####.
In the output column I need the telephone to be in this format ##########. (No parentheses dash or spaces)
I know how I can remove the parentheses with this function.
row1.phone.replaceAll("\\(", "").replaceAll("\\)","")
Can anyone edit this string method so it will remove the dash and space between the area code and the actual number?
Thanks,
Andrew
This one removes all non-digit characters:
row1.phone.replaceAll("[^0-9]", "")
If I wanted to remove $ sign from a Currency value what would be the syntax for that?
row1.Amount.replaceALL("$","") is not working for me.
I can't use your String Method because it would remove the . separating Dollar and Cents.
My input Column has values like $20.00 $100.00 $5.00 etc
Thanks,
Andrew
@sm as your requirement is miscellaneous its better we write a java routine and call in the tMap. You can exactly define routine as per your need.
Try this
row1.input_col.replaceAll("[^\\d\\.\\,\\s]+", "")