• 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: limiting numeric runs
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: limiting numeric runs


  • Subject: Re: limiting numeric runs
  • From: Emmanuel <email@hidden>
  • Date: Thu, 9 Jan 2003 11:25:46 +0100

At 12:47 PM -0500 08/01/03, Paul Skinner wrote:
I need to limit the length of numeric runs in a given text. Does anyone have a suggestion as to a non-looping solution?

I'm afraid that's a one-liner with a regular expression. If you can use the Satimage osax:

------------------ untested, sorry
on LimitNumericRuns(inputText, runLengthLimit)
change "([0-9]{4})[0-9]+" into "\\1" in inputText with regexp
end
--------------------------------

I am writing "4" instead of "runLengthLimit" for sake of clarity. You will change that if you use the handler.

Emmanuel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: limiting numeric runs
      • From: Paul Skinner <email@hidden>
References: 
 >limiting numeric runs (From: Paul Skinner <email@hidden>)

  • Prev by Date: password syntax for remote access
  • Next by Date: Re: Localization
  • Previous by thread: Re: limiting numeric runs
  • Next by thread: Re: limiting numeric runs
  • Index(es):
    • Date
    • Thread