From dbad4166746ec21945a5132964985858c634fac2 Mon Sep 17 00:00:00 2001 From: Nick Battle Date: Sun, 3 Mar 2024 16:58:12 +0000 Subject: [PATCH] Fix for XSDElement attributes with multiple spaces --- xsd2vdm/src/main/java/xsd2vdm/XSDElement.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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())