I personally haven't used that plugin much before since it is kind of
difficult to use due to there being no building block methods to work
with when creating a script to abstract it from internal Editra APIs.
Thus, in its current form it requires you to have a fair amount of
knowledge of the inner workings of Editra to get very far.
I can give some rough starting points to get you towards a script to
do what you want though.
First I will point you towards the API manual, I am working on a
better version that will be out in the near future but most every
function / object can be found in there.
(http://editra.org/docs/editra_api/annotated.html)
The following code should get you most of the way towards the task you
want to do:
# 1. Import the regular expression module
import re
# 2. Get the current text buffer
textCtrl = wx.GetApp().GetCurrentBuffer()
# 3. Get the Unicode text from the control
text = textCtrl.GetText()
# 4. Do your regex search/replacements on the text using the standard
python 're' module.
...
# 5. Update the modified text in the control (retaining current caret position)
currentPosition = textCtrl.GetCurrentPos()
textCtrl.SetText(text)
textCtrl.SetCurrentPos(currentPosition)
Cody