On Aug 22, 2011, at 14:03, Tudor wrote: > Search and replace is OK if I want to modify many tags at once, but > for editing a single tag is overkill.
______________________________________________________________________ That depends. :) -- Best Regards, Chris ------------------------------------------------------------------------------------------------ tell application "BBEdit" try tell selection of front text window replace "<\\w[^>]*>" using "<div class=\"foo\">" options {search mode:grep, case sensitive:false} replace "</\\w[^>]*>" using "</div>" options {search mode:grep, case sensitive:false} end tell on error errMsg number errNum set sep to "==============================" set e to sep & return & "Error: " & errMsg & return & sep & return ¬ & "Error Number: " & errNum & return & sep beep display dialog e end try 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. Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>