Alteryx Designer Desktop Discussions

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

Pick out Pattern Number + ALL CAPS

hellyars
13 - Pulsar

RegEx question.  See example below.  I need to split LINE_NMBR and TITLE from RAW_TXT.   TITLE is always in ALL CAPS.  I tried this expression.

 

 

(^\d{1,3}.?)\s(.*$)

 

 

 

Unfortunately, this expression does not account for ALL CAPS, which means it will mistakenly include any COMMENT from RAW_TXT that starts with a number.   COMMENTS may start with a number, may include CAPS, but are NEVER ALL CAPS.  

 

How can I modify my expression to target only lines that start with a dight {1.3} followed by a string in ALL CAPS?   

 

UPDATE...There is a minor pattern exception. The TITLE could include Numbers + ALL CAPS.   See #8 below

 

RecordIDRAW_TXTLINE_NMBRTITLE & COMMENT
1139 LOGISTICS AND ENGINEER EQUIPMENT - SDD139139 LOGISTICS AND ENGINEER EQUIPMENT - SDD
2Program increase - mobile camouflage net systems Program increase - mobile camouflage net systems
3194 excess support costs 194 excess support costs
4Program increase - health usage monitoring system Program increase - health usage monitoring system
5MSV(N) feasibility study ahead of needHIPPO POT and LUT request ahead of need MSV(N) feasibility study ahead of needHIPPO POT and LUT request ahead of need
6141 MEDICAL MATERIEUMEDICAL BIOLOGICAL DEFENSE EQUIPMENT141MEDICAL MATERIEUMEDICAL BIOLOGICAL DEFENSE EQUIPMENT
7Program increase - wearable medical device for TBI prevention Program increase - wearable medical device for TBI prevention
8234 155MM SELF-PROPELLED234155MM SELF-PROPELLED
6 REPLIES 6
messi007
15 - Aurora
15 - Aurora

@hellyars,

 

could you take a look on this:

 

messi007_0-1608653544182.png

 

 

Attached the workflow,

 

Hope that helps,

Regards,

Hi @hellyars 

 

Please check the below screenshot. Hope it helps. Cheers!

 

christine_assaad_0-1608653410085.png

 

hellyars
13 - Pulsar

@christine_assaad   It works, but I found an exception.    I found a LINE_NMBR and TITLE that technically is not ALL CAPS because it includes numbers after the initial set of numbers.   This is the specific problem.   234 155MM SELF-PROPELLED.   Because of the 155MM it does not pass the regex -- when this is a proper LINE_NMBR and TITLE combination to split.

hellyars
13 - Pulsar

@messi007  Can you reload your sample.  It has an html extension after the yxmd.   Also, I updated the question to reflect a pattern exception. 

 

Hi @hellyars 

 

Please check if the below is general enough. Thanks!

 

christine_assaad_0-1608655191581.png

 

messi007
15 - Aurora
15 - Aurora

@hellyars,

messi007_0-1608655358090.png

 

Attached the workflow 🙂

 

Hope that Helps,

 

Regards,

 

Labels