-1

I have the following lines (using nedit)

R1_1 vsp vsp/1 23

R2_1 vsp/2 vsp/3 30

R3_2 vsp/3 vsp/4 50

R3_2 v2 v1 50

C1 vsp/1 vsp 60

I want to just replace the numbers with number*0 for the lines that start with R and contain the string vsp. I want the following in the above example

R1_1 vsp vsp/1 23*0

R2_1 vsp/2 vsp/3 30*0

R3_2 vsp/3 vsp/4 50*0

R3_2 v2 v1 50

C1 vsp/1 vsp 60

What's the regular expression for that on nedit?

1 Answers1

0

You may try the following find and replace, in regex mode:

Find:    ^(R.*\bvsp\b.*?)(\d+)$
Replace: $1$2*0

Demo

On Nedit regex, you might try using the following replacement instead:

\1\2*0
Tim Biegeleisen
  • 502,043
  • 27
  • 286
  • 360