Thanks for the response.

I didn't know about double-clicking a quote which is great in PHP.

I prefer the AppleScript with grep since it gives far more options
like skipping escaped quotes. I've ended up with the following script:

tell application "BBEdit"

  -- search backwards for non-escaped quote character
  find "[^\\\\](\"|')" searching in text 1 of text document 1 options
{search mode:grep, starting at top:false, wrap  around:false,
backwards:true, case sensitive:false, match words:false, extend
selection:false} with selecting match

 set quotePat to "[^\\\\]" & (grep substitution of "\\1")
 select insertion point after selection
 set theStart to characterOffset of selection

  -- find first appearence of just found quote
  find quotePat searching in text 1 of text document 1 options {search
mode:grep, starting at top:false, wrap  around:false, backwards:false,
case sensitive:false, match words:false, extend selection:false} with
selecting match
  select insertion point before selection
  set theEnd to (characterOffset of selection)

  -- select string without quotes
  select characters theStart through theEnd of text 1 of text document
1
end tell
-- 
You received this message because you are subscribed to the 
"BBEdit Talk" discussion group on Google Groups.
To post to this group, send email to bbedit@googlegroups.com
To unsubscribe from this group, send email to
bbedit+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/bbedit?hl=en
If you have a feature request or would like to report a problem, 
please email "supp...@barebones.com" rather than posting to the group.

Reply via email to