Re: Simple text question
Re: Simple text question
- Subject: Re: Simple text question
- From: Michelle Steiner <email@hidden>
- Date: Mon, 7 Jul 2008 12:56:26 -0700
On Jul 7, 2008, at 12:33 PM, Script2 wrote:
This file comes from various software's' (M. Word, quark..), in some
cases
there might be some formatting junk before "6000[F]this" which I
want to
strip out. I thought If I could figure out the position of
"6000[F]this" (by
word count) then I could copy the paragraph from word x to end of
paragraph.
This file can be 25 to 300 paragraphs long. The numbers before the
[F] can
be between 1 to 7000 and the word "[F]" can be any word, and no space
between 6001[F]this.
If I understand you correctly, you want to strip out any formatting
that might be before the number, but you want to retain the number and
"[F]". And this formatting is always at the beginning of the file, so
in this case it might be before "6000", but not before "6001"/ Is
that correct?
If all that is correct and the number is always four digits long, this
will work:
set a to "gibberish6000[F]this is test (#1).
6001[F]this is test (#2)."
set offst to offset of "[" in a
if offst is greater than 5 then
set a to text offst through end of a
end if
If all that is not correct, you will need to better explain what
you're trying to accomplish.
-- Michelle
--
Help, I've caught a cult, and can't get out!
_______________________________________________
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