diff --git a/xsd2vdm/src/main/java/xsd2vdm/XSDElement.java b/xsd2vdm/src/main/java/xsd2vdm/XSDElement.java index 084f874..6bc43a8 100644 --- a/xsd2vdm/src/main/java/xsd2vdm/XSDElement.java +++ b/xsd2vdm/src/main/java/xsd2vdm/XSDElement.java @@ -296,11 +296,11 @@ protected String toVDM(String indent) try { - if (value.matches("([0123456789.+-eE]+ ?)+")) + if (value.matches("^([+-.0123456789eE]+\\s*)+$")) { List nums = new Vector(); - Pattern p = Pattern.compile("[0123456789.+-eE]+"); + Pattern p = Pattern.compile("[+-.0123456789eE]+"); Matcher m = p.matcher(value); while (m.find())