-1

I try to express myself as good as I can.

I am trying to find all "A" in a text with a "B" but only the ones that contain a number after it.

With the extended search I tried the following:

A[^A-Za-z]

This works, but this selects the number as well I do not want to replace the number. I only want to replace the character "A" to "B", while leaving the numbers as they are.

Is this somehow possible in Notepad++?

I greatly appreciate any suggestion.

Wiktor Stribiżew
  • 607,720
  • 39
  • 448
  • 563
Serge Inácio
  • 1,366
  • 9
  • 22
  • Possible duplicate of [While replacing using regex, How to keep a part of matched string?](https://stackoverflow.com/questions/14458160/while-replacing-using-regex-how-to-keep-a-part-of-matched-string) – Wiktor Stribiżew Oct 03 '18 at 13:29
  • 1
    Use `A([^A-Za-z])` => `B$1`. Or `A(?=\d)` => `B` if you really want to match `A`s that have a digit right after them. – Wiktor Stribiżew Oct 03 '18 at 13:30

1 Answers1

0
  • Find what: A(?=\d)
  • Replace with: B

enter image description here

  • Replace all

enter image description here

Toto
  • 89,455
  • 62
  • 89
  • 125