Instead of removing newlines you may want to change the createTablePattern as follows:

```java
    static final Pattern createTablePattern = Pattern.compile(
            "\\A" +                             // (start statement)
            "CREATE\\s+(TABLE|VIEW)\\s+" +      // (1) CREATE TABLE
            "([\\w.$]+)"                       // (2) <table name>
            Pattern.CASE_INSENSITIVE|Pattern.MULTILINE|Pattern.DOTALL
            );
```