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

Re: strange regexp


  • Subject: Re: strange regexp
  • From: Tom Robinson <email@hidden>
  • Date: Tue, 8 Sep 2009 12:05:04 +1200

On 2009-09-08, at 09:42, Robert Poland wrote:

When I run this I get
set current_name to "9:01 pm.."
change "[a-z ]" into "" in current_name with regexp
set a to current_name as string
-->"9:01 pm.."

But when I run this I get
set current_name to "9:01 pm.."
change "[a-z ]" into "" in current_name with regexp
-->"9:01.."

What am I doing wrong?

I don't know what application or scripting edition is giving you 'change' but the regular _expression_ is doing exactly what you've asked it:  any letter from 'a' to 'z', plus space, is being translated to null.

What result would you like?

Cheers

 _______________________________________________
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

References: 
 >strange regexp (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: date/Snow Leopard changed
  • Next by Date: Re: strange regexp
  • Previous by thread: strange regexp
  • Next by thread: Re: strange regexp
  • Index(es):
    • Date
    • Thread