AnsweredAssumed Answered

Splitting a string to get last 3 characters

Question asked by JohnO'Mullane on Oct 3, 2018
Latest reply on Oct 3, 2018 by LeonardOlteanu

Hi,

I want to pull back the last 3 characters of a given string but don't know if that's possible in Automic. 

 

I tried to use this syntax but it doesn't like the -3

 

:SET &LENGTH# = STR_LENGTH(&NAME#)
:SET &ENV# = SUBSTR(&NAME#,&LENGTH#,-3)
:PRINT &ENV#

 

Anyone know how  I can archive this?

 

Thanks,

John.

Outcomes