HI!
I'm not familiar with scripting, so please forget me if the question is too basic or out of scope.
I would need to learn how to automate a simple search-replace (eventually with greps) grep that would run only on the selected text of the front BBEdit window.
The idea is to trigger the find-replace with a keyboard shortcut.
I guess it could be done with Applescript, something like:
tell application "BBEdit"
tell front text window's text
set _selection to contents of selection
set newText to "(here the grep "find" and "replace" patterns, in this case "<p" and "somethingelse <p" )
set text of selection to newText
end tell
end tell
Could someone give me a hand with this?
Any ideas would be much appreciated.
Thanks for your time.
Pablo
PS: i'm attaching a screen capture of the search itself, not a grep in this case.

CCd