1

I need to replace this:

HSOD,BASE,DFLT,001,06-19-2012,[any string],1,0,0

With this:

HSOD,BASE,DFLT,001,06-19-2012,[any string],1,0,N

where the [any string] part needs to be a wild card.

slhck
  • 223,558
  • 70
  • 607
  • 592
Steve
  • 11
  • 1
  • 2
  • What exactly `[any string]` contains? And what about last zero at right side, it should replace with letter `N`? – Siva Charan Oct 29 '12 at 13:37
  • any string contains values like 000NIS00000069 ; and yes replace right side 0 with an N – Steve Oct 29 '12 at 18:24

2 Answers2

2

If all the lines are the same format you can just check for lines ending in ,0 and replace that ,0 with ,N.

Search:

,0$

Replace:

,N

If you don't know the value of the last digit(s) then you could do the following.

Search:

,[[:digit:]]*$

Replace:

,N
Doug
  • 21
  • 2
0

You can find this:

(HSOD,BASE,DFLT,001,06-19-2012,.*?,1,0,)0

And replace by this:

\1N

With the regular expression box checked, of course.

m4573r
  • 5,561
  • 1
  • 25
  • 37