Re: pulling substrings, test first
Re: pulling substrings, test first
- Subject: Re: pulling substrings, test first
- From: Michelle Steiner <email@hidden>
- Date: Fri, 7 Dec 2007 10:54:15 -0700
On Dec 7, 2007, at 9:02 AM, Justin Laden wrote:
How can I get AppleScript to help me remove the "job number" out of
the following string:
Q1892_04_NGSS Exterior AM Gel.indd
I just want the "Q1892" segment.
If by "segment" you mean the string beginning with that and ending
with "NGSS", and the format is always the same, then
first word of "Q1892_04_NGSS Exterior AM Gel.indd"
If you mean just those five characters, and that segment is always
five characters, then this will work
text 1 through 5 of "Q1892_04_NGSS Exterior AM Gel.indd"
If you mean everything before the first underscore with a varying
number of chararacters, this will work:
set AppleScript's text item delimiters to "_"
text item 1 of "Q1892_04_NGSS Exterior AM Gel.indd"
-- Michelle
--
"Experience in that marvelous thing that enables you to recognize a
mistake when you make it again." --F. P. JONES
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden