• 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: Strip substring using do shell script and regex
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strip substring using do shell script and regex


  • Subject: Re: Strip substring using do shell script and regex
  • From: "S. J. Cunningham" <email@hidden>
  • Date: Wed, 28 Dec 2016 15:11:41 -0500

On Dec 28, 2016, at 10:52 AM, debt wrote:

> 	I’m trying to strip a substring of 2 digits following an asterisk (e.g. *67 or *82, etc.) but I’m running into problems.  Can someone see what I’m doing wrong here?
>
> set clean_text to do shell script "echo " & quoted form of original_name & " | perl -pe ’s/\*\d{2}//g;'"
>
> 	The regex works fine in Perl, so I’m not sure what’s wrong with the above.
>
> Thanks,
> Marc

Not an answer to you question but Satimage OSAX has regular expression search and replace (along with a lot of other nice things).

Steve
------------------
OS X 10.6.8, AppleScript 2.1.2


 _______________________________________________
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: Strip substring using do shell script and regex
      • From: Jeremy Roussak <email@hidden>
References: 
 >Strip substring using do shell script and regex (From: debt <email@hidden>)

  • Prev by Date: Re: Strip substring using do shell script and regex
  • Next by Date: Re: Mail on El Capitan – Message ID Ref Fails to Compile
  • Previous by thread: Re: Strip substring using do shell script and regex
  • Next by thread: Re: Strip substring using do shell script and regex
  • Index(es):
    • Date
    • Thread