|laziness, impatience, and hubris|
Re: How do I cut single characters out of a stringby pileofrogs (Priest)
|on Jan 13, 2012 at 22:07 UTC||Need Help??|
Aaand just because everyone else is posting to this:
It all hinges on how you define what you are trying to remove. Is it the 1st instance of the number '1'? Is it the 1st digit in the string? Is it the 9th char from the beginning, the 6th from the end?
Some possible solutions:
Will kill all the '1's w/out the regex engine.
Will kill the very first digit found in a string
Will remove the 6th from the last char. substr treats negative numbers as offset from the end of the string, so you don't need to do (strlen -6).