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
RecordID | RAW_TXT | LINE_NMBR | TITLE & COMMENT |
1 | 139 LOGISTICS AND ENGINEER EQUIPMENT - SDD | 139 | 139 LOGISTICS AND ENGINEER EQUIPMENT - SDD |
2 | Program increase - mobile camouflage net systems | Program increase - mobile camouflage net systems | |
3 | 194 excess support costs | 194 excess support costs | |
4 | Program increase - health usage monitoring system | Program increase - health usage monitoring system | |
5 | MSV(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 | |
6 | 141 MEDICAL MATERIEUMEDICAL BIOLOGICAL DEFENSE EQUIPMENT | 141 | MEDICAL MATERIEUMEDICAL BIOLOGICAL DEFENSE EQUIPMENT |
7 | Program increase - wearable medical device for TBI prevention | Program increase - wearable medical device for TBI prevention | |
8 | 234 155MM SELF-PROPELLED | 234 | 155MM SELF-PROPELLED |
@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.
@messi007 Can you reload your sample. It has an html extension after the yxmd. Also, I updated the question to reflect a pattern exception.