remove the last "\n".your output is "sb.toString()"= "54321\n5432\n543\n54\n5\n"
I started in your same shoes, but luckily here was (and still is!) an awesome place to practice and learn :)
Thanks CM for replying ^_^
Most probably a whitespace problem. It's difficult to see them in browsers. Make sure you are not printing any extra newline chars before or at the end of pattern.
Loading collection data...
remove the last "\n".your output is "sb.toString()"= "54321\n5432\n543\n54\n5\n"
I started in your same shoes, but luckily here was (and still is!) an awesome place to practice and learn :)
Thanks CM for replying ^_^
Most probably a whitespace problem. It's difficult to see them in browsers.
Make sure you are not printing any extra newline chars before or at the end of pattern.