Browse files

Update master

  • Loading branch information...
1 parent bf3e761 commit dfa6e39b88e1b2b1b22312d7207e483631d22c35 laune committed Jul 10, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 drools-compiler/src/main/java/org/drools/lang/dsl/DefaultExpander.java
View
6 drools-compiler/src/main/java/org/drools/lang/dsl/DefaultExpander.java
@@ -60,8 +60,7 @@
Pattern.compile( ruleOrQuery,
Pattern.DOTALL | Pattern.MULTILINE | Pattern.COMMENTS );
- private static final Pattern comments1 = Pattern.compile( "(?:/\\*(?:[^*])*\\*+/)" );
- private static final Pattern comments2 = Pattern.compile( "(?:/\\*(?:\\*+[^*/])*\\*+/)" );
+ private static final Pattern comments = Pattern.compile( "/\\*.*?\\*/", Pattern.DOTALL );
// This pattern finds a statement's modify body
private static final Pattern modifyFinder = Pattern.compile( "\\{(.*?)\\}" );
@@ -322,8 +321,7 @@ private String cleanupExpressions(String drl) {
// }
private String removeComments(String drl) {
- drl = comments1.matcher(drl).replaceAll("");
- return comments2.matcher(drl).replaceAll("");
+ return comments.matcher(drl).replaceAll("");
}
/**

0 comments on commit dfa6e39

Please sign in to comment.