• 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: Coercing ligatures to expanded characters
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Coercing ligatures to expanded characters


  • Subject: Re: Coercing ligatures to expanded characters
  • From: debt <email@hidden>
  • Date: Thu, 12 Jan 2017 12:13:30 -0800

On Jan 12, 2017, at 10:49 AM, Jacob Small <email@hidden> wrote:

do shell script "echo '" & (characters of inputString) & "' >" & quoted form of (filepath & "grepTarget.txt")
set theResult to paragraphs of (do shell script "grep -E -o '\\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,6}\\b' " & quoted form of (filepath & "grepTarget.txt"))

this is hanging up on a ligature in the domain name of an email address.

Jacob,

I’m not sure if this would solve your problem, but perhaps using Unicode characters instead of ASCII will give you the proper result.  As long as you’re calling out to the shell, you could use a regex in Perl.  I’m sorry I’m not experienced enough to give an example, but maybe a page like this will be helpful:

http://docs.activestate.com/activeperl/5.10/lib/pods/perlrecharclass.html

Just an idea,
Marc
 _______________________________________________
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: 
 >Coercing ligatures to expanded characters (From: "Jacob M. Small" <email@hidden>)
 >Re: Coercing ligatures to expanded characters (From: "Jacob M. Small" <email@hidden>)
 >Re: Coercing ligatures to expanded characters (From: Jacob Small <email@hidden>)

  • Prev by Date: Re: Coercing ligatures to expanded characters
  • Next by Date: Re: Coercing ligatures to expanded characters
  • Previous by thread: Re: Coercing ligatures to expanded characters
  • Next by thread: Re: Coercing ligatures to expanded characters
  • Index(es):
    • Date
    • Thread