I need to have regular expression which find a character which not following by same character after it. Mean exclude double even multiple same character.
For example, when i need to find 'e'
character from string: "need only single characteeer"
, it is mean will find 'e'
on each words breakdown as below:
"need"
> not match because it has double 'e'
"only"
> not match because no 'e'
"single"
> match because has only single 'e'
"characteeer"
> not match because has multiple of 'e'
Not sure whether it is possible or not. Any answer or comment will be highly appreciated. Thanks in advance.
UPDATE
Maybe my question above still ambiguous. Actually i need to find the 'e'
character only instead the words. I am going to replace it with double character. So the one which already has double character will not replaced.
The main purpose is to replace 'e'
with 'ee'
for example. But the one which has 'ee'
or 'eee'
already, or even more 'e'
, will be untouched.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…