diff --git a/src/main/java/org/gcube/portlets/user/td/expressionwidget/server/C_ExpressionParser.java b/src/main/java/org/gcube/portlets/user/td/expressionwidget/server/C_ExpressionParser.java index 13527bf..c2c566f 100644 --- a/src/main/java/org/gcube/portlets/user/td/expressionwidget/server/C_ExpressionParser.java +++ b/src/main/java/org/gcube/portlets/user/td/expressionwidget/server/C_ExpressionParser.java @@ -623,8 +623,12 @@ public class C_ExpressionParser { C_TextReplaceMatchingRegex textReplaceMatchingRegex = (C_TextReplaceMatchingRegex) exp; TDText tdRegexp = new TDText(textReplaceMatchingRegex.getRegexp() .getValue()); - TDText tdReplacing = new TDText(textReplaceMatchingRegex.getReplacing() - .getValue()); + + String replacement=textReplaceMatchingRegex.getReplacing().getValue(); + if(replacement==null){ + replacement=""; + } + TDText tdReplacing = new TDText(replacement); TextReplaceMatchingRegex textRepRegex = new TextReplaceMatchingRegex( parse(textReplaceMatchingRegex.getToCheckText()), tdRegexp,