I am trying to achieve text to excel conversion wherein my Input.txt data is unstructured which contains spaces and commas, I am trying with space delimiter but as in the input text file name column contains sometimes first name only and sometimes first and last names, and because of this it is generating two name columns in output.xlsx which is misleading the next column data as well and as per required output both names should come in one Name Column only.
Please find attached workflow, input.txt, output.xlsx and RequiredOutput.xlsx file for reference.
The regex pattern check for the match after the TYPE value . You can go through lookahead and lookbehind concepts in regex for better understanding.
In your case
AA ABC123 AEDAN GOFF 0.00 0.00M1
TYPE variable will be assigned to AA at the runtime, pattern looks like (?<=AA\s+)(\w+) . While matching, the regex engine will search for the sequence of characters which is followed by the value “AA”.
\s - stands for whitespace character
\w - sequence of characters + - one or more occurrence
(?<=pattern to ldentify)(pattern to extract value) - Lookbehind syntax