EmEditor (text editor) Forum Index
   Questions and Answers about Macros
     Question about Find/Replace with RegExp and Backslash
Register To Post

Flat Previous Topic | Next Topic
Poster Thread
jowra
Posted on: 3/24/2010 10:19 am
Just popping in
Joined: 3/24/2010
From:
Posts: 2
Question about Find/Replace with RegExp and Backslash
Hello!

First of all, thank you for this great editor!

Currently I'm trying to write my frist macros and would like to find and replace some strings:

For example search for: (1) or (2) or (3) and so on...

I would like to replace such a string with: \absatz

So for the moment I'm just trying the Find method and use the following:

document.selection.Find("\(.\)", eeFindNext | eeFindReplaceRegExp);

But that macro "finds" all characters, since only the dot-operator is used. But if I use this regular expression in the replace-dialog it works like it should be. I've tried other combinations in the macro, for instance [0-9] finds all numbers, thats correct, but as soon as I use the blackslash-char, it is simply ignored.

And if - for testing reasons - I search for a simple string that works and would like to replace it with a LaTex-command like \section, the backslash is ignored again even if I use \\section.

Am I doing something completly wrong?

Thanks for any hint.
Flat Previous Topic | Next Topic


Subject Poster Date
 » Question about Find/Replace with RegExp and Backslash jowra 3/24/2010 10:19 am
     Re: Question about Find/Replace with RegExp and Backslash Yutaka 3/24/2010 12:13 pm
       Re: Question about Find/Replace with RegExp and Backslash jowra 3/24/2010 12:33 pm

Register To Post
 
English čeština Deutsch español français italiano 日本語 한국어 Русский 简体中文 繁體中文