community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
#SANTALYTICS

The highly anticipated Alteryx Community tradition is back! We hope you'll join us!

Learn More
SOLVED

RegEx to read XML to find file paths

Highlighted
Asteroid

Hi Community, 

 

I need a bit of help from a RegEx guru to read the below and pull back the file paths as I need to be able to determine if proper UNC paths have been used.

 

Any help would be appreciated. Please note mapped drives might change ie C: / D: / E: etc as well as the actual directory and file extension

 

Input Output
  
<Directory>C:\Program Files\Alteryx\bin\</Directory>C:\Program Files\Alteryx\bin\
<Directory>\\Program Files\Alteryx\bin\</Directory>\\Program Files\Alteryx\bin\
  
<File OutputFileName="" RecordLimit="" SearchSubDirs="False" FileFormat="0">C:\Program Files\Alteryx\bin\.Myfile.yxmd</File>C:\Program Files\Alteryx\bin\Myfile.yxmd
<File OutputFileName="" RecordLimit="" SearchSubDirs="False" FileFormat="0">\\Program Files\Alteryx\bin\Myfile.yxmd</File>\\Program Files\Alteryx\bin\Myfile.yxmd
Alteryx Certified Partner
Alteryx Certified Partner

Hi @DamienMinter 

 

Try this RegEX formula:

 

REGEX_Replace([Input], "<.*?>", "")

 

Cheers,

Alteryx Partner

Put the following in the Regex tool - set to Parse

Example attached

<.*?>(.*)<.*?>

Alteryx Partner

Put the following in the Regex tool - set to Parse

Example attached

<.*?>(.*)<.*?>

Labels