• 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: Remove extra spaces from a string
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Remove extra spaces from a string


  • Subject: Re: Remove extra spaces from a string
  • From: Michelle Steiner <email@hidden>
  • Date: Fri, 6 Jun 2003 11:29:39 -0700

On Friday, June 6, 2003, at 09:46 AM, Matyas Ferenc Farkas wrote:

I have to get the name of the file (last text item of... With a space TID),
what works fine, and the creation date of the file. Between the first three
columns there are multiple spaces. I get many "" strings, if I do a repeat
loop with a space TID. How can I remove the extra spaces in AS or Finder
from a string like this?

If all you need are the creation date and filename,

set bar to "-rwx------ 0 286 512 Jun 06 12:36 demo10.log"
set text item delimiters to space
set foo to text items -1 through -4 of bar as text
set text item delimiters to ""
foo

set bar to "-rwx------ 0 286 512 Jun 06 12:36 demo10.log"
set text item delimiters to space
set foo to text items -1 through -4 of bar as text
set text item delimiters to ""
foo

--> "Jun 06 12:36 demo10.log"

--Michelle

--
Peter pull at St. Taffy's tonight! (Or is it the other way around?)
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Remove extra spaces from a string (From: Mátyás Ferenc Farkas <email@hidden>)

  • Prev by Date: Re: If exists logic
  • Next by Date: Re: If exists logic
  • Previous by thread: Re: Remove extra spaces from a string
  • Next by thread: Re: Remove extra spaces from a string
  • Index(es):
    • Date
    • Thread