I have an XML and I am looking for finding particular tag (in this case "FirstName") and removing space in the value only if there is a - character before the space.
In other words, I want to keep spaces if there is no - front of them. I want to do this using an XSL stylesheet with RegEx matching and replace function.
Expected result is Sam-Louise, removing space between "Sam-" and "Louise"
<?xml version="1.0" encoding="utf-8"?> <NCV Version="1.14"> <Invoice> <customer> <customerId>12785</customerId> <FirstName>Sam- Louise</FirstName> <LastName>Jones</LastName> </customer> </Invoice> </NCV>
No comments:
Post a Comment