Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

2 Answers

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
add comment

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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