Hello community,
I have the below sample data and I am trying to convert it by using either Trim or Substring function. I am not able to figure out the best way to achieve this.
We have to consider the length of the last part of the string to be either 3 or 4 when performing the operation. There are other values that are more than 4 and those should not be modified.
| Input | Expected Output |
| ABC-12031-AAC | ABC-12031-A |
| ABC-102003-ABCD | ABC-102003-AB |
| ABC-102393-BWE | ABC-102393-B |
Can someone suggest me the options we have and I can try them?
Thank you