• 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: evalhate without parsing?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: evalhate without parsing?


  • Subject: Re: evalhate without parsing?
  • From: Christopher Stone <email@hidden>
  • Date: Thu, 02 May 2013 13:51:24 -0500

On May 02, 2013, at 08:24, Robert Poland <email@hidden> wrote:
Is there a easier/better way to compare these two lines for the latest number without parsing?
______________________________________________________________________

Hey Bob,

I'm not sure what you're looking for, but the choices you have are basically to either compare the whole string or to break it up and compare the parts.

--
Best Regards,
Chris

-------------------------------------------------------------------------------------------
# Dependency: Satimage.osax
on fndUsing(fndStr, returnStr, srcData, caseSensitive, regExFlag, wholeWord, allOccurrences, stringResult)
try
set findResult to find text fndStr in srcData case sensitive caseSensitive regexp regExFlag ¬
whole word wholeWord using returnStr all occurrences allOccurrences string result stringResult
on error
return false
end try
end fndUsing
-------------------------------------------------------------------------------------------

set strA to "Smile 3.6.1 (build 710) full edition"
set strB to "Smile 3.7.0 (build 768) full edition"

if not (strA = strB) then
set _ver to fndUsing("Smile ([\\d.]+)", "\\1", strB, false, true, false, false, true) of me
set _build to fndUsing("build (\\d+)", "\\1", strB, false, true, false, false, true) of me
end if

-------------------------------------------------------------------------------------------

 _______________________________________________
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: 
 >evalhate without parsing? (From: Robert Poland <email@hidden>)

  • Prev by Date: Notification When Finder Is Done Copying
  • Next by Date: Re: Applet confirmation dialogs on startup
  • Previous by thread: evalhate without parsing?
  • Next by thread: Re: evalhate without parsing?
  • Index(es):
    • Date
    • Thread