• 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: Help with find text command
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with find text command


  • Subject: Re: Help with find text command
  • From: Ed Stockly <email@hidden>
  • Date: Sat, 4 Aug 2007 16:16:50 -0700


Can you duplicate the Tcl output in AppleScript or not is the question.

Well, at this point the challenge becomes becomes an arbitrary and unfair exercise.


You've eliminated the portions of the challenge where AppleScript performs best and limited it to the portions where shell scripting performs best.


There were only two legal IBSN-10s in the previous "t" variable I posted. The other two were illegal. One had an extra "z" on the end and the other was embedded in a larger "word" that looked like a bizarre email address.

A good part of my script is dedicated to extracting an ISBN number from mid string because that was in the challenge.
I read your challenge word for word, and no where does it say not to include valid ISBN numbers that are in another string. Those are valid numbers and deserve to be included.


These are things that happen in the real word, data isn't always neat and tidy. AppleScript can do it. Shell scripting should be able to as well.

I won't proceed with this until your script finds those numbers. (I'm on vacation and don't have the time now anyway)

As far as I'm concerned, I've met your challenge.

I've brought you the broomstick of the wicked witch, but now you're changing the rules.

Unless shell scripting isn't the wonderful whiz of wiz we wished it was.



Ed




>>philip>>The script found the two "legal" ISBN-10s in the 't' variable.

There are four "legal" ISBN-10s in the 't' variable. Which are you finding and which are you not finding?

There were only two legal IBSN-10s in the previous "t" variable I posted. The other two were illegal. One had an extra "z" on the end and the other was embedded in a larger "word" that looked like a bizarre email address.

No, no, those are legal ISBNs. ISBNs do not have to be preceeded by a space or followed by a space.

<http://regexadvice.com/blogs/dneimke/archive/2003/12/06/179.aspx> <http://www.isbn.org/standards/home/isbn/international/html/usm4.htm>


Plus the original poster began this asking for a solution that would find those two numbers, and you included that text as a key part of your challenge, you can't change the rules once we've started.

Here's what William wrote in reply to one of Hamish's posts:

"Thanks for the heads up. However, in this case I think it may be a moot point because of the nature of the project. The script is intended to assist in updating the publisher's catalog which currently contains only 10 digit ISBNs. I am using the script to put the 13 digit ISBNs into the catalog (as well as updating the prices). So I'm fairly confident that the situation you describe won't be encountered (but still good to know for future reference)."


Your script needs to find those too, or it fails your own challenge.

Can you duplicate the Tcl output in AppleScript or not is the question.



Philip Aker email@hidden



_______________________________________________ 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 find text command
      • From: Philip Aker <email@hidden>
References: 
 >Re: Help with find text command (From: email@hidden)
 >Re: Help with find text command (From: Philip Aker <email@hidden>)

  • Prev by Date: Re: Accessing the Accessibility Inspector
  • Next by Date: Re: Accessing the Accessibility Inspector
  • Previous by thread: Re: Help with find text command
  • Next by thread: Re: Help with find text command
  • Index(es):
    • Date
    • Thread