We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Parse Data

DataPirate26
10 - Fireball

Hi All,

 

Below I have attached one dataset which has one Field as Input.

 

example : AC:PROCESSING-USR00035149. I have to parse out the Bold part from this. 

Note: If you see the dataset the values are not in any standardised pattern and in different rows they are present in a different way. From all the rows we have to Parse out this similar Part. Can someone help me out with this ?

 

below attached is a sample data. 

8 REPLIES 8
Jotigautam
10 - Fireball

Attached is a solution using regex. Let me know if this serves the purpose.

flying008
15 - Aurora

Hi, @DataPirate26 

 

As red box , what are you want output?

 

InputParseReplaceDiff
AC:PROCESSING-USR00035149USR00035149USR00035149 
AC:COORDINATION-USR00035149USR00035149USR00035149 
AC:COORDINATION-USP99999999USP99999999USP99999999 
AC:COORDINATION-USP99999999USP99999999USP99999999 
AC:COORDINATION-USP99999999USP99999999USP99999999 
AC:COORDINATION-USP00509575USP00509575USP00509575 
AC:COORDINATION-USP00688914USP00688914USP00688914 
AC:MGR REVIEW-USR00027097USR00027097USR00027097 
AC:FIRST REVIEW-USR00026669 IN PROGUSR00026669USR00026669 
AC:COORDINATION-USR00026669USR00026669USR00026669 
AC:MGR REVIEW-USR00027097USR00027097USR00027097 
AC:MGR REVIEW-USR00029116 IN PROGUSR00029116USR00029116 
AC:MGR REVIEW-USR00029118 IN PROGUSR00029118USR00029118 
AC:FIRST REVIEW-USR00026669 IN PROGUSR00026669USR00026669 
AC:MGR REVIEW-USR00027097 IN PROGUSR00027097USR00027097 
AC:COORDINATION--USR00029116USR00029116USR00029116 
AC:MGR REVIEW-USR00029116 IN PROGUSR00029116USR00029116 
AC:MGR REVIEW-USR00029116 IN PROGUSR00029116USR00029116 
AC:REVIEW-USR00026669USR00026669USR00026669 
AC:FIRST REVIEW-USR00026669 IN PROGUSR00026669USR00026669 
AC:COORDINATION-USR00029116USR00029116USR00029116 
AC:MGR REVIEW-USR00029116USR00029116USR00029116 
AC:MGR REVIEW-USR00029116USR00029116USR00029116 
AC:REVIEW-USR00038013USR00038013USR00038013 
AC:REVIEW-USR00035195USR00035195USR00035195 
AC:REVIEW-USR00038013USR00038013USR00038013 
AC:REVIEW-USR00037183USR00037183USR00037183 
AC:REVIEW-USR00037722USR00037722USR00037722 
AC:REVIEW-USR00035195USR00035195USR00035195 
AC:PROCESSING-USR00031950USR00031950USR00031950 
AC:PROCESSING-USR00031950USR00031950USR00031950 
AC:COORDINATION-USP00463022USP00463022USP00463022 
AC:FIRST REVIEW-USP00585852USP00585852USP00585852 
AC:PROCESSING-WRAAT01-B46WRAAT01WRAAT01B46-
AC:FIRST REVIEW-USP00540312USP00540312USP00540312 
AC:FIRST REVIEW-USP00506143USP00506143USP00506143 
AC:COORDINATION-2000102252-B5320001022522000102252B53-
AC:PROCESSING-2000108275-B5320001082752000108275B53-
AC:REVIEW-USP00694019-B39USP00694019USP00694019B39-
AC:PROCESSING-USR00028397- DSUSR00028397USR00028397 
AC:FIRST REVIEW-USR00027097-S&R IN PROGRUSR00027097USR00027097 
AC:FIRST REVIEW-USR00027097-S&R IN PROGRUSR00027097USR00027097 
AC:FIRST REVIEW-USR00027097-S&R IN PROGRUSR00027097USR00027097 
AC:PROCESSING-USR00035120 PROCESS CHECKUSR00035120USR00035120 
AC:PROCESSING-USR00039634 PROCESS CHECKUSR00039634USR00039634 

 

So, If you just want to get 10 consecutive characters (please see the filed [Parse] ), use Parse method by RegEx tool.

(?<=\-)(\w+)(?=-|\s|$)

 

flying008_0-1662967176128.png

 

******

If this syntax can help you , please mark it as a solution for share more.

binuacs
21 - Polaris

@DataPirate26 Another way of doing this withe the regex tokenize method

 

binuacs_0-1662965127612.png

 

DataPirate26
10 - Fireball

@binuacs The solution worked Fine. Can we modify the formula to parse out the Review , Processing and Coordination part as well in a separate field. Can you help with this 

DataPirate26
10 - Fireball

@flying008 In the red part I only need the USP and USR part not the Last two letters. Also along with that I need a separate Field which will have the the word Review, Processing or Coordination parsed out from the Input String. I would need it in a separate field beside the Output. 

binuacs
21 - Polaris

@DataPirate26 Updated the workflow

 

binuacs_0-1662967665834.png

 

DataPirate26
10 - Fireball

@binuacs Thanx for the quick response. Worked perfectly fine. I could have used a formula to Create a new field but this is a much more efficient solution. Appreciate it. 

flying008
15 - Aurora

Hi, @DataPirate26 

 

Don't worry, please use the syntax with parse method by RegEx tool;

 

AC\:([A-Z|\s]+)-(?<=\-)(\w+)(?=-|\s|$)

 

******

If this syntax can help you , please mark it as a solution for share more.

Labels
Top Solution Authors