Help with grep
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