0

I have multiple lines with values like:

F9 23
F9 41
F9 32
F9 12

Those values change in many lines, I need change them to:

F9 23 text
F9 41 text
F9 32 text
F9 12 text

I try:

  • find: F9 .*.*.*
  • replace:

But i've no idea how i can replace and keep the original value after F9 and add a text after it.

1

1 Answer 1

1
  • Ctrl+H
  • Find what: ^F9\h+\d+\K
  • Replace with: text # a space then the text to be added
  • check Wrap around
  • check Regular expression
  • Replace all

Explanation:

^           # beginning of line
  F9        # literally
  \h+       # 1 or more horizontal spaces
  \d+       # 1 or more digits
  \K        # forget all we have seen until this position

Result for given example:

F9 23 Text
F9 41 Text
F9 32 Text
F9 12 Text
1
  • @CaioCésar: You're welcome, glad it helps.
    – Toto
    Dec 31, 2018 at 16:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .