title: Getting input of one or more rows ending with char sequence not only seperated by space or new line - java
body: <p>I need to read a user input that begins with "begin", "BEGIN" or "Begin" and the input can be one or more rows until user writes "end", "END" or "End". End is separated from previous String(s) with non-letter character (new line, space or "}" and so on).</p>
  
  <p>I have tried something like this, but I know that's wrong.</p>
  
  <pre><code>String everything = sc.next();
  while (true) {
      String part = sc.next();
      part.toUpperCase();
      if (part.equals("END")) {
          everything = everything.concat(part);
          break;
      } else {
          everything = everything.concat(part);
      }
  }
  </code></pre>