EmEditor (text editor) Forum Index
   Regular Expressions
     RegExp OR function misbehaviour ?
Register To Post

Flat Previous Topic | Next Topic
Poster Thread
Salabim
Posted on: 9/9/2009 9:03 pm
Quite a regular
Joined: 9/5/2009
From: Ghent (Belgium)
Posts: 58
RegExp OR function misbehaviour ?
Hi,

I have a problem with a macro I created which consists of 1 line :
document.selection.Replace("(\\r\\n|-|,| )(denk|wil|dacht|kan|wilde|ben|zie)je( |,|\\.|!|\\?|(\\r)*\\n)","\\1\\2 je\\3",eeFindNext | eeReplaceAll | eeFindReplaceRegExp);


... having the line :

denkje wilje dachtje kanje wildeje zieje

... I expected it would replace it like this :

denk je wil je dacht je kan je wilde je zie je

... but I only replaced the 1st, 3rd, and 5th match, like this :

denk je wilje dacht je kanje wilde je zieje

Why doesn't it replace the 2nd (wilje) the 4th (kanje) and the 6th (zieje) item please ?
Flat Previous Topic | Next Topic


Subject Poster Date
 » RegExp OR function misbehaviour ? Salabim 9/9/2009 9:03 pm
     Re: RegExp OR function misbehaviour ? Salabim 9/11/2009 7:34 am
       Re: RegExp OR function misbehaviour ? Yutaka 9/11/2009 9:57 am
         Re: RegExp OR function misbehaviour ? Salabim 9/11/2009 11:21 am
           Re: RegExp OR function misbehaviour ? thr 9/12/2009 10:26 am
             Re: RegExp OR function misbehaviour ? Salabim 9/12/2009 3:39 pm
               Re: RegExp OR function misbehaviour ? thr 9/12/2009 11:22 pm
                 Re: RegExp OR function misbehaviour ? Salabim 9/13/2009 5:41 am
                   Re: RegExp OR function misbehaviour ? Salabim 9/13/2009 8:01 am
                     Re: RegExp OR function misbehaviour ? Salabim 9/13/2009 9:00 am
                       Re: RegExp OR function misbehaviour ? thr 9/13/2009 9:59 am
                         Re: RegExp OR function misbehaviour ? Salabim 9/13/2009 10:50 pm
                           Re: RegExp OR function misbehaviour ? TimGreen 11/10/2009 5:41 am

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