Ian Crew wrote:
Hi:
I'm trying to write an Applescript that uses BBEdit to do a grep-=based
replace. My code currently looks like:
tell application "BBEdit"
activate
--set foo to window
open j opening in new_window
tell text document 1
activate
set searchStr to "2007-08-\\d\\d"
set replaceStr to "<!--MODDATE-->" & mod_date & "<!--\\/MODDATE-->"
replace (searchStr as string) using (replaceStr as string)
options {search mode:literal, starting at top:true} searching in text 1
^^^^^^^
substituting "grep" for "literal" here should give some improvement
(been there, done that)
--
---
Kjetil Rå Hauge, U. of Oslo, PO Box 1003 Blindern, N-0315 Oslo, Norway
Tel. +47/22856710, fax +47/22854140
--
------------------------------------------------------------------------
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_script.shtml>
List archives: <http://www.listsearch.com/bbeditscripting.lasso>
To unsubscribe, send mail to: <[EMAIL PROTECTED]>