• 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: Find and Replace Text
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Find and Replace Text


  • Subject: Re: Find and Replace Text
  • From: Emmanuel <email@hidden>
  • Date: Thu, 25 Apr 2002 03:10:25 +0200

At 6:44 PM +0200 24/4/02, Eric Phillips wrote:

> is there a way of searching for ', space number' no matter what the
>number is and have it replace with 'tab number'

If you use Regular Expressions, that's a one-liner (I don't know if the
comma must be included):

--------------------------
set theText to (change ", ([0-9])" into tab & "\\1" in theText with regexp)
--------------------------

In Classic, you need a Scripting Addition (osax) to use Regular Expressions.

In the example I use the Satimage osax' implementation.

Emmanuel

For those interested:
[0-9] means one digit
( ) means store it
\1 (escaped into "\\1") means reload it
_______________________________________________
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.

References: 
 >Find and Replace Text (From: "Eric Phillips" <email@hidden>)

  • Prev by Date: Reco Label Stringer
  • Next by Date: Re: Owner/User Name in OSX
  • Previous by thread: Re: Find and Replace Text
  • Next by thread: Re: Find and Replace Text
  • Index(es):
    • Date
    • Thread