Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
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