I need to match, exact length of a string and I'm using below code for that :
declare namespace
ns123='urn:lt:sb:xmlns:services:customers:customerinformationfile:GetCustByGlobalId:1.2';
matches(//ns123:legalCode, "[0-9-]{10}")
Problem is that it works only for greater length (for example, if field content is 11, it fails, but it doesn't, if the content is 9).