In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Regular Expression

Kerry
6 - Meteoroid

Hello, I am attempting to parse field information from xml data using a regular expression. The issue I am facing seems simple, but I am not familiar enough with regex to think through it.

 

My Expression:

[<](\<\w+\>)[>](\<\w+\>)

 

This expression feels very close to what I need; however, within my second matched pair, I would also like to parse out non-word characters (periods/decimals specifically) . The kicker is that I also want to include letters as well if they are there. 

 

Example:

<ApolloVersion>9.0.042</ApolloVersion>

 

My expression, as you can tell, will return two columns that I am calling Name and Value.

 

Those two columns look like:

NameValue
ApolloVersion9

 

What I would like:

Name

Value

ApolloVersion9.0.042

 

Keep in mind, the value field can also be letters.

 

Thanks in advance!

Kerry

2 REPLIES 2
MSalvage
11 - Bolide

@Kerry,

 

I think you just want the ".*" it will give you any number of characters. Below should work.

 

 

EDIT: this is incorrect disregard for now.

[<](\<\w\>)[>](.*)[<]

 

EDIT: Okay Below should work:

 

[<](\<\w+\>)[>](.*)[<]

 

Best,

MSalvage

Kerry
6 - Meteoroid

This worked perfectly, Thank you!

Labels
Top Solution Authors