• 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: Select text (numeric words) between brackets
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Select text (numeric words) between brackets


  • Subject: Re: Select text (numeric words) between brackets
  • From: Emmanuel <email@hidden>
  • Date: Wed, 2 Aug 2006 19:20:42 +0200

At 2:47 PM +0200 8/2/06, Jan Bultereys wrote:
Is there a syntax which selects every text with brackets?

I feel like you call "brackets" what I call "parentheses".

The regular expression could be:

\([^)]+\)

which means: match a parenthesis "(" escaped in the regular expression because parentheses have a special meaning, then 1 or more ("+") of any character except ("^") closing parenthesis, then a closing parenthesis.

Or you could specify more precisely the stuff inside the parentheses, which will make the regular expression slightly more legible:

\([0-9,]+\)

Finally, to get all the occurrences as a list of strings, write - like the dictionary suggests:

find text "\\([0-9,]+\\)" in theString with regexp, string result and all occurrences

 -- {"(15,28)", "(13,90)", "(12,54)", "(10,21)"}

Now, I don't know Quark, but maybe what you really need is, not the strings, but their locations, in which case use the command without the "string result" option.

Emmanuel
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Re: Select text (numeric words) between brackets (From: Jan Bultereys <email@hidden>)

  • Prev by Date: Re: Applescript-users Digest, Vol 3, Issue 391 (out of office)
  • Next by Date: Connection Error -- What is this????
  • Previous by thread: Re: Select text (numeric words) between brackets
  • Next by thread: Re: Select text (numeric words) between brackets
  • Index(es):
    • Date
    • Thread