AnsweredAssumed Answered

Remove  all characters after hyphen from a given XML element

Question asked by gouthamr388096 on Dec 12, 2017
Latest reply on Dec 12, 2017 by 51662476

I have an XML which looks like below. I want to use data process shape and rempve all characters after "-" character from <custOrderRef>  element below. So I want that element to be <custOrderRef>SO1203</custOrderRef>. I want to do this in data process shape may be groovy or regular expression which ever is possible.

 

<UserOrderResponse>
<inputFileName>OMS-CPG940-20171206 0845242.xml</inputFileName>
<custOrderRef>SO1203-00002244</custOrderRef>
---

---

---</UserOrderResponse>

 

Thanks

G

Outcomes