Deleting characters from a String?

How do I delete the first 10 characters from a string?
The string must contain “ABCD” (in this example, it will be replaced for something else of course)
I have no idea how to start a code for that…
I’ve tried

 tell application "Finder"
set myString to "ABCDEFGHIJKLMNOPQRSTUVXZ1234567890"
if myString contains "ABCD" then
delete the 10 first characters
else
display dialog "Nah...."
end if
end tell

But it doesn’t work at all…
Help please?

Hi :slight_smile:
Try this:

set myString to "ABCDEFGHIJKLMNOPQRSTUVXZ1234567890" 
if myString contains "ABCD" then 
set myNewString to text 11 thru end of myString
return myNewString --> "KLMNOPQRSTUVXZ1234567890"
else 
display dialog "Nah...." 
end if 

:wink:

http://www.apple.com/applescript/guidebook/sbrt/pgs/sbrt.07.htm

This link contains a sub-routine for performing “find/change” with text.