mardi 20 juin 2017

How to deal with newline in regex

I am currently trying to deal with newlines in regex. I am looking for regex which finds me class and method main inside this class. There is an example of file:

public class sNUMBER_project_III {
// some code
   public static void main(String[] args){
       // code
   }
}

Regex which i have found out already:

"public class s\d*_projekt_III+\s.*\n.*"

Aucun commentaire:

Enregistrer un commentaire