Hello, I am trying to remove the leading string 'ZZZ DO NOT USE' from the longer string 'ZZZ DO NOT USE THE DOUGH'. When I use the TrimLeft function, it works as expected until I add the last 'E' in the remove string, and then it removes the 'E' from 'USE' but also the space and the 'T' after it!
Any help would be much appreciated!!
Solved! Go to Solution.
I would be ok with it removing the space, but not the 'T' from 'THE'
Here is how Trim function works what Trim does is it doesnt remove the specific string instead it remove character in quote wherever they occur until a non-speicified character is encountered.
Case 1: TrimLeft([Field],"ZZZ DO NOT US")
Input: ZZZ DO NOT USE THE DOUGH.
Since E is not there in the specified text ZZZ DO NOT US it stops at E.
Case 2: TrimLeft([Field],"ZZZ DO NOT USE")
Input: ZZZ DO NOT USE THE DOUGH.
Since T is already there and H is not there in the specified text ZZZ DO NOT USE it stops at H.
Hope this helps : )
You can use Regex like this instead which say if string is that the start remove.
Hope this helps : )