Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

regex - Notepad++ use both regular expressions and extended search

I need to find all that do not precede the letter M;
Seems I can't do this:


[^M]

I can only do with extended search selected or [^M] with regular expressions selected; but not together.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You should instead use this regex:

R(?!M)

Explanation:

  • R Any Unicode newline sequence.
  • (?!M) Negative Lookahead: Assert "M" cannot be matched.

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...