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 Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.

REGEX for end of a string to contain _V1.3.sas

BuckeyeJane2
5 - Atom

REGEX - Beginner. 

 

I need to match this string where the numeric values in this string parse is a variable. 

Below are some examples.  Can someone help me understand how to check if the string contains _V[number].[number]

 

STARS_DATA_Help_Needed_RULE0_BK_AUTOMATE_V1.1.sas

S_DATATEST_QC_RULE_1BOOK_AUT_V10.1000.sas

ST_DATA_TEST_QC_RULE2_BOOK_AUTO_V3.19.sas

HELP_STRS_DATAENG_QC_RULE_3BOOKs_MT_V1.1.sas

 

Thank you in advance.  

 

2 REPLIES 2
Miles_Waller
8 - Asteroid

If you use the Regex tool with output method "Match," you get the desired result.

 

I used the expression ^.+V\d\.\d\.sas$ to achieve this. What this means is:

 

  • "^.+" = from the beginning of the line, at least one of any character
  • "V\d\.\d\.sas$" = V[one digit].[one digit].sas, at the end of the line

 

This gives you the result below. The two that failed were "V10.1000.sas" and "V3.19.sas" which do not meet the criteria of the expression.

 

Data

 

Data_Matched

STARS_DATA_Help_Needed_RULE0_BK_AUTOMATE_V1.1.sas

True
S_DATATEST_QC_RULE_1BOOK_AUT_V10.1000.sasFalse
ST_DATA_TEST_QC_RULE2_BOOK_AUTO_V3.19.sasFalse
HELP_STRS_DATAENG_QC_RULE_3BOOKs_MT_V1.1.sasTrue
flying008
15 - Aurora

Hi, @BuckeyeJane2 

 

Maybe you can show both data table of input and output. then we can see how many numbers for you need matched .