mbien commented on pull request #3393:
URL: https://github.com/apache/netbeans/pull/3393#issuecomment-1003181587


   > I had a look how `canBeMultilinePattern` is used and I think it would be 
easier and more consistent to modify the regexp `MULTILINE_REGEXP_PATTERN` in 
`TextRegexpUtil`. The util method is used to determine if a single line in the 
file is enough for examination or if the whole file needs to be matched.
   
   yeah I looked at that regexp too. Its just that the method actually expects 
a regexp (see doc and also the actual pattern) and checks if the regexp would 
want to match multiline. If it would also check if the regexps itself would be 
multiline that would make it a weird frankenstein method - so i decided against 
it.
   
   > 
   > You can already search for multiline patterns, if you use regexp. Enter 
`\nTEST\n` into the search box and switch to match to "Regular Expression" and 
you will find only places where `TEST` is the only content in a line.
   
   True, but it would have made things more complicated since i wanted to 
replace a string which contained regexp control characters. Turning on regexps 
would require escaping.
   
   ```java
   public class ${name} {
       public static void main( String[] args )
       {
           System.out.println( "Hello World!" );
       }
   }
   
   ```
   thought might as well fix it instead of using the bash.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to