- February 11, 2012 at 1:16 pm #9999
Thank you!February 11, 2012 at 3:20 pm #10002
charBefore = "[;
charAfter = ]";
strSelectedText = document.selection.Text;
document.selection.Text = charBefore + strSelectedText + charAfter;February 11, 2012 at 3:42 pm #10003
Yes i do it the same way:
#title = "Enclose selection";
#tooltip = "Enclose an selection with an sign";
// Select some text and execute this macro to put an sign
// in front and at the end of the selected text;
//mySign = "\%"
mySign = prompt( "Enter sign to enclose selection:", "\%" );
selText = document.selection.Text;
outText = mySign + selText + mySign;
document.selection.Text = outText;
Should be easy to modify this code
and replace mySign with LeadingSign and TrailingSign 🙂February 11, 2012 at 4:29 pm #10004
ToadLoadin & Stefan! Thanks a lot!
But now I need one more tip please 🙂
Let’s say I need to replace a text, which matches the pattern ^(;[ ]*[ ])(.*) with this one: 1
How would I do so?
Thank you!February 11, 2012 at 9:06 pm #10008
EmEditor Help – EmEditor Macro Reference – Tutorial > Using Regular Expressions
EmEditor Help – How to – Search > Regular Expression SyntaxFebruary 11, 2012 at 9:42 pm #10009
Stefan, the issue is not with the RegEx syntax, but how use the RegEx expressions inside of the Java Scripts (please see my previous post).
How should I let to Java know that I wrote a regular expression and not just a string?
Thank you!February 11, 2012 at 10:20 pm #10010
I’ve got it!
You must be logged in to reply to this topic.