• 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: text manipulation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: text manipulation


  • Subject: Re: text manipulation
  • From: Dave Johnson <email@hidden>
  • Date: Tue, 5 Jun 2001 14:37:59 -0400

At 12:47 PM -0400 6/5/01, email@hidden wrote:
I have a time string as follows "10:56 am". I have been trying to figure out a way to change "am" to "a.m." or to "a.m", with no luck : ). Anybody have a clue? Thanks.

John
_______________________________________________
applescript-users mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/applescript-users

With the scripting addition "RegEx commands" this can be done as follows:

set thetime to "10:56 am"

set newtime to (REMatch thetime pattern "([0-9]+:[0-9]+)(.)(.)(.)" using "\\1 \\3. \\4.")

display dialog newtime


References: 
 >text manipulation (From: email@hidden)

  • Prev by Date: Re: text manipulation
  • Next by Date: formatting and importing text to Quark
  • Previous by thread: Re: text manipulation
  • Next by thread: Re: text manipulation
  • Index(es):
    • Date
    • Thread