EmEditor (text editor) Forum Index Regular Expressions
Example please for (?n:true_expression:false_expression) | Register To Post |
| Flat | Previous Topic | Next Topic |
| Poster | Thread |
|---|---|
| JohnQSmith | Posted on: 10/18/2011 6:39 am |
Not too shy to talk ![]() ![]() Joined: 7/15/2011 From: Posts: 30 |
Re: Example please for (?n:true_expression:false_expression) I see the problem with both of your tests. It's the same thing that took me so long to figure out how it works.
Here's the key... The whole RegEx must match in order for it to work. In other words, you have to set up the RegEx with an alternation so that it has both a success and a failure point. In your first test, only the first line matched your RegEx (I'm using underscores as filler to demonstrate). Here's how I changed your RegEx to work. Your second example is the same thing. Hope this helps. |
| Flat | Previous Topic | Next Topic |
| Subject | Poster | Date |
|---|---|---|
| |
Stefan | 10/13/2011 10:51 pm |
| |
JohnQSmith | 10/17/2011 12:10 pm |
| |
Stefan | 10/17/2011 9:46 pm |
| |
Stefan | 10/17/2011 11:18 pm |
| » |
JohnQSmith | 10/18/2011 6:39 am |
| |
Stefan | 10/18/2011 10:12 am |
| |
JohnQSmith | 10/18/2011 10:39 am |
| Register To Post | |


