• 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
Help with grep
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Help with grep


  • Subject: Help with grep
  • From: Bert Groeneveld <email@hidden>
  • Date: Fri, 25 Dec 2015 22:18:03 +0100

Hi, is there a way to simplify this statement using grep? Can anyone post example code? (I have satimage.osax installed).

I want to check if a string starts wit one or two digits followed by a plus sign followed by one digit followed by a space followed by the word “gratis”.

if (_tempData as text) starts with "1+1 gratis" or (_tempData as text) starts with "2+1 gratis" or (_tempData as text) starts with "3+1 gratis" or (_tempData as text) starts with "2+2 gratis" or (_tempData as text) starts with "5+5 gratis" or (_tempData as text) starts with "1+2 gratis" or (_tempData as text) starts with “10+2 gratis” then

Thanks in advance for any help, Bert.
 _______________________________________________
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: Help with grep
      • From: "Jacopille, David" <email@hidden>
    • Re: Help with grep
      • From: Axel Luttgens <email@hidden>
  • Prev by Date: Re: creating your own commands
  • Next by Date: Re: creating your own commands
  • Previous by thread: Re: creating your own commands
  • Next by thread: Re: Help with grep
  • Index(es):
    • Date
    • Thread