Joel Christophel wrote:I want the following code to replace any apostrophes that come after a letter that is not s with an exclamation point. The program isn't even reaching the body of the if statement.
Between this and your
previous thread, I suspect you're tackling this problem existentially, which is not usually a good way to go.
My advice:
1. Forget about regexes.
2. Turn OFF your computer.
3. Sit down and write out
in English what it is you want to do.
4. When you've done that, think about scenarios that might cause problems. Again, write out solutions for them
in English.
5. (Only when you're
sure you've done a good job of 3 and 4) Turn your computer back on and try and code your results in
Java. You may even find that regexes are NOT what you want for everything.
Winston