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
  • 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
  • @CaioCésar: You're welcome, glad it helps. – Toto Dec 31 '18 at 16:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.