<div><span style="color:#000000"><span style="float:none;font-family:'helvetica';font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Hello,</span></span><div style="color:rgb( 255 , 255 , 255 );font-family:'helvetica';font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"> </div><div style="color:rgb( 255 , 255 , 255 );font-family:'helvetica';font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="color:#000000">I use Postgres with version PostgreSQL 11.5 on x86_64-pc-linux-gnu, compiled by gcc (Debian 7.3.0-5) 7.3.0, 64-bit;</span></div><div style="color:rgb( 255 , 255 , 255 );font-family:'helvetica';font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"> </div><div style="color:rgb( 255 , 255 , 255 );font-family:'helvetica';font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><div> </div><div><span style="color:#000000">select ltrim('TRYTND', 'TRY’); — result is ND but I expected TND</span></div><div><span style="color:#000000">select ltrim('TRYUSD', 'TRY’); — result is USD it is same what I expect</span></div><div> </div><div><span style="color:#000000">I need to change with;</span></div><div><span style="color:#000000">select substring('TRYTND', length('TRY')+1, length('TRYTND')); — TND</span></div><div><span style="color:#000000">select substring('TRYUSD', length('TRY')+1, length('TRYUSD')); — USD</span></div></div><div style="color:rgb( 255 , 255 , 255 );font-family:'helvetica';font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"> </div><div style="color:rgb( 255 , 255 , 255 );font-family:'helvetica';font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="color:#000000">Is there some thing that I misunderstood?</span></div><div style="color:rgb( 255 , 255 , 255 );font-family:'helvetica';font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"> </div><div style="color:rgb( 255 , 255 , 255 );font-family:'helvetica';font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="color:#000000">I thing it does not look for all of second parameters and works recursive. </span></div><div style="color:rgb( 255 , 255 , 255 );font-family:'helvetica';font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="color:#000000">select ltrim('TRYTND', 'TRY’);</span></div><div style="color:rgb( 255 , 255 , 255 );font-family:'helvetica';font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="color:#000000">1. TRYTND TRY</span></div><div style="color:rgb( 255 , 255 , 255 );font-family:'helvetica';font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="color:#000000">2. TND</span><span style="color:#000000;white-space:pre"> </span><span style="color:#000000">TRY — recursive</span></div><div style="color:rgb( 255 , 255 , 255 );font-family:'helvetica';font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="color:#000000">3. ND </span><span style="color:#000000;white-space:pre"> </span><span style="color:#000000">TRY — it only found first character of second parameter(T) into first parameter and removed it on first parameter.</span></div><div style="color:rgb( 255 , 255 , 255 );font-family:'helvetica';font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"> </div><div style="color:rgb( 255 , 255 , 255 );font-family:'helvetica';font-size:12px;font-style:normal;font-weight:normal;text-decoration:none;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="color:#000000">Thanks,</span></div></div><div> </div><div> </div><div> </div>