Ian,
I think your mistake was saying "search mode: literal" instead of
"search mode: grep" as in Lewis' example.
Here's my own example AppleScript (incidentally replacing italics &
bold with em & strong):
replace "(<|</)i>" using "\\1em>" searching in text 1 of text
document 1 options {search mode:grep, starting at top:true, wrap
around:false, backwards:false, case sensitive:false, match
words:false, extend selection:false}
replace "(<|</)b>" using "\\1strong>" searching in text 1 of text
document 1 options {search mode:grep, starting at top:true, wrap
around:false, backwards:false, case sensitive:false, match
words:false, extend selection:false}
-- CC
On Nov 9, 2007 11:43 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> On 9-Nov-2007, at 07:57, Ian Crew wrote:
> > replace (searchStr as string) using (replaceStr as string) options
> > {search mode:literal, starting at top:true} searching in text 1 of
> > text window 1
>
>
> This is how it is in my last BBEdit script, but it was written for 8.5
> or 8.6, so it's possible the syntax changed.
>
> --First I defined the following to make the replace lines more readable:
>
> set S_grepTrue to {search mode:grep, starting at top:true,
> wraparound:false, backwards:false, case sensitive:false, match
> words:false, extend selection:false}
>
> set TempWindow to make new text window with properties {name:"Temp",
> soft wrap text:true, source language:"HTML", «class Colr»:true}
>
> set TempWinID to the ID of TempWindow
>
> replace "\\r" using " " searching in text 1 of window id TempWinID
> options S_grepTrue
>
> --
> I know that you believe you understand what you think I said but I am
> not sure you realize that what you heard is not what I meant.
>
>
>
>
> --
> ------------------------------------------------------------------
> Have a feature request? Not sure the software's working correctly?
> If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
> List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
> List archives: <http://www.listsearch.com/BBEditTalk.lasso>
> To unsubscribe, send mail to: <[EMAIL PROTECTED]>
>
>
--
--> CC <---
--
------------------------------------------------------------------
Have a feature request? Not sure the software's working correctly?
If so, please send mail to <[EMAIL PROTECTED]>, not to the list.
List FAQ: <http://www.barebones.com/support/lists/bbedit_talk.shtml>
List archives: <http://www.listsearch.com/BBEditTalk.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>