I'm new 'round here, but thought I would try to help, I did not know about the 'substring' option until someone on this forum informed me.
Maybe this could be of some help.
The 'substring' has a lot of options as to; to/from/last/delete - experiment with the pop-up.
cheers.
(*
How can I delete the first 10 characters and the final character of a KM variable using Apple Script?
*)
set someVarStr to "0123456789Text Starting with char 11 ends with deleteX"
set cleanVarStr to text 11 thru -2 of someVarStr
return cleanVarStr
-->Text Starting with char 11 ends with delete
#### DOWNLOAD:
<a class="attachment" href="/uploads/default/original/3X/5/0/501625377f20d5fa341b7aaa5363f6d03f1fd518.kmmacros">Extract Sub-String from String [Example].kmmacros</a> (5.2 KB)
**Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.**
---
![image|536x938](upload://bDMOrUht4sJ47sfnYj84RSBGYHc.png)