Advent of Code is now back for a limited time only! Complete as many challenges as you can to earn those badges you may have missed in December. Learn more about how to participate here!
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Unable to Parse XML

hasithg
5 - Atom

Hi,

I have a XML message from which I need to extract one field. 

 

I need to extract the number 212121212 from the following string which is towards the middle of the full xml message: <pacs:CdtrAcct><pacs:Id><pacs:Othr><pacs:Id>212121212</pacs:Id></pacs:Othr></pacs:Id></pacs:CdtrAcct>

 

I have tried xml parse but that doesn't seem to work. I've used a regex parse (attached) which seems to split the full field into 3 parts from where I was hoping to further extract the digits as mentioned above. However, I've had no success so far. 

 

Can anyone give me any advice on how I can extract that number? 

 

Thanks

3 REPLIES 3
flying008
15 - Aurora

Hi, @hasithg 

 

FYI.

 

 

 

 

 

(?<=<pacs\:CdtrAcct><pacs:Id><pacs:Othr><pacs:Id>)(\d+?)(?=<\/pacs:Id><\/pacs:Othr><\/pacs:Id><\/pacs:CdtrAcct>)

 

录制_2024_04_22_09_59_29_606.gif

 

 

 

hasithg
5 - Atom

That worked!!! Thanks flying008!!!

flying008
15 - Aurora

Hi, @hasithg 

 

If can help get your want, please mark it as a solution and give a like for more share.

Labels
Top Solution Authors