Re: NSRegular expression question
Re: NSRegular expression question
- Subject: Re: NSRegular expression question
- From: Shane Stanley <email@hidden>
- Date: Sun, 3 Sep 2017 11:50:40 +1000
On 3 Sep 2017, at 1:12 am, Jim Weisbin <email@hidden> wrote:
>
> To get rid of the leading zeroes in order to do the look up, I’m casting the
> string to an integer, which works. It’s guaranteed to be a number based on
> the regex above, but is there any down side to doing it that way?
Sounds fine to me:
set theWord to (theText's substringWithRange:matchRange)'s
integerValue() as text
Also, these two lines:
set thePathNoExt to pathString's stringByDeletingPathExtension()
set theText to current application's NSString's stringWithString:thePathNoExt
can be one:
set theText to pathString's stringByDeletingPathExtension()
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>, <latenightsw.com>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden