in reply to Re: Replacing a given character starting with the xth occurence in a string
in thread Replacing a given character starting with the xth occurence in a string
You wouldn't be the first person here to misread (and therefore mis-answer) a question, so we might all want to be lenient on that account (but do go back and read the original question again, it isn't quite a simple substitution question). But everyone should take the time to test the code that they post at least minimally. Your code does not compile because the variable should be $p not p$, and making that change doesn't give the result you stated because your code replaces w's instead of e's. It looks as if you are trying to be careful by using -w and my() variables, so maybe you tested code and then retyped it for submission, making typos as you went. Copy and paste is a much safer way to participate in online forums.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Replacing a given character starting with the xth occurence in a string
by Anonymous Monk on May 21, 2001 at 10:50 UTC | |
by davorg (Chancellor) on May 21, 2001 at 15:37 UTC |