Re: Select text (numeric words) between brackets
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