Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
    
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

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
share|improve this answer

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.

share|improve this answer

You must log in to answer this question.

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