• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: Simple text question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Simple text question


  • Subject: RE: Simple text question
  • From: "Script2" <email@hidden>
  • Date: Mon, 7 Jul 2008 15:33:51 -0400
  • Importance: Normal


I thought it would be fair to try it myself before posting.

But here what I want

Example:
6000[F]this is test (#1).

6001[F]this is test (#2).

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.

Thanks

Ruby



-----Original Message-----
From: email@hidden [mailto:email@hidden] On Behalf Of Mark J.
Reed
Sent: Monday, July 07, 2008 3:07 PM
To: Script2; email@hidden;
applescript-users-bounces+chas_profitt=email@hidden;
email@hidden
Subject: Re: Simple text question

What you want is apparently not "word 3 through 6" of anything,
according to the AS def'n of "word".  So why not back up, stop
programming, and tell us what the desired end result is?



On 7/7/08, Script2 <email@hidden> wrote:
> I have not used Python or Perl. If I don't get this resolved, I will look
> into both.
>
>
>
> Ruby
>
>
>
> -----Original Message-----
> From: email@hidden
> [mailto:email@hidden]
> Sent: Monday, July 07, 2008 2:21 PM
> To: Script2
> Cc: email@hidden;
>
applescript-users-bounces+chas_profitt=email@hidden
> Subject: Re: Simple text question
>
>
>
>
> I am not experience enough in the ways of Apple Script Foo... but if it
> supports Regular Expressions they are a likely answer to your question.
>
> Or you could solve your problem with Python or Perl which do support
regular
> expressions.
>
>
> Charles Profitt
> Sr. Network Technician
> BrainBench Certified - (Master)Microsoft Security | (Master)Storage Area
> Networks Concepts | (Master)Microsoft Vista Desktop Administration
> 75 Barker Road
> Pittsford, NY 14534
>
> Important Notice:
> This communication, including any attachments, is intended only for the
use
> of the individual(s) or entity(s) to which it is addressed and may contain
> information that is privileged, confidential and exempt from disclosure
> under applicable law. If the reader of this communication is not the
> intended recipient, you are hereby notified that any dissemination,
> distribution or reproduction of any part of this communication in any
format
> is strictly prohibited. If you have received this communication in error,
> please notify us immediately by replying to this communication and
deleting
> the original and any automatically generated copies. Thank-you for your
> co-operation.
>
>
>
>
> "Script2" <email@hidden>
> Sent by:
>
applescript-users-bounces+chas_profitt=email@hidden
>
> 07/07/2008 01:02 PM
>
>
> To
>
> <email@hidden>
>
>
> cc
>
>
>
>
> Subject
>
> Simple text question
>
>
>
>
>
>
>
>
>
>
>
>
> Set file1text to read file (hotfile0 from 1
> Set gterm to every paragraph of file1text
> Repeat with aword in gterm
>                 Display dialog aword
>                 Set wordcnt to number of words in aword
>                 Repeat with x from 1 to wordcnt
>                                  Display dialog word x of aword
>                 End repeat
> End repeat
>
>
>
> Sample text
>
> 6000[F]this is test (#1).
>
> 6001[F]this is test (#2).
>
>
> Display dialog aword  - displays - 6000[F]this is test (#1).
>
> Word x of aword ignores the square bracket and the parenthesis. What am I
> missing? I tried set newword to word x of aword as string - did not work.
>
> 6000
> F
> This
> is
> test
> #
> 1
>
> I want to test which word contains [F].
>
> Thanks
>
> Ruby
>
>
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
>
>
> tsford.monroe.edu>
>
> sford.monroe.edu
> Archives:  <http://lists.apple.com/archives/applescript-users>
> http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
>
>
>
>

--
Sent from Gmail for mobile | mobile.google.com

Mark J. Reed <email@hidden>


 _______________________________________________
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

  • Follow-Ups:
    • Re: Simple text question
      • From: Michelle Steiner <email@hidden>
    • Re: Simple text question
      • From: "Mark J. Reed" <email@hidden>
References: 
 >Re: Simple text question (From: "Mark J. Reed" <email@hidden>)

  • Prev by Date: RE: Simple text question
  • Next by Date: Re: Simple text question
  • Previous by thread: Re: Simple text question
  • Next by thread: Re: Simple text question
  • Index(es):
    • Date
    • Thread