package org.yamcs.yarch.streamsql;

public class Utils {
    public static boolean like(String str, String pattern) {
        pattern = pattern.toLowerCase(); 
        pattern = pattern.replace(".", "\\."); 
        pattern = pattern.replace("?", ".");
        pattern = pattern.replace("%", ".*");
        str = str.toLowerCase();
        return str.matches(pattern);
    }
}

@@ -29,16 +29,81 @@
 amsql;%0A%0A
+import java.util.regex.Matcher;%0Aimport java.util.regex.Pattern;%0A%0A
 public c
@@ -216,17 +216,16 @@
 rCase();
- 
 %0A       
@@ -263,17 +263,16 @@
  %22%5C%5C.%22);
- 
 %0A       
@@ -400,34 +400,100 @@
     
-return str.matches(pattern
+Matcher m = Pattern.compile(pattern, Pattern.DOTALL).matcher(str);%0A        return m.matches(
 );%0A 

Fix LIKE expression not working for multiline strings