I need to extract the specified values from the input text file and need to update the extracted values into output text file. Can someone guide me please how to extract it
below is the input text file data, in that we need to extract 1440 and 1080 values, but beside the values there is some spaces those are not static, some times its more space and some time its less spaces. Hence I need to extract in dynamic way.
Any leads in helping in extraction is much appreciated.
<< date >> 28/11/2023 invoicenumber : AB 430538/00 PAGE : 1
Customer : REACH DATE :28/11/2023 ARRIVAL H :12.45
=> Use this regex in Find Matching Patterns Activity. Input will the text which is saved in an variable.
=> Store the output in a variable. It will be of DataType IEnumerable(Match).
=> Run a for Each loop for the variable stored and print the currentitem.
Hi @Parvathy
which ever you provided that one is not working after copied the data from text file
see the Screenshot and also I have attached the input file please find below
1 will be the letter KHT
2 will be the digit 6874
3 will be the space between the KHT6874 1
4 will be the 1
5 will be the before 1 spaces
6 ?
7 ?
8 ?
please let me know
May this explanation will make you clear about the given regex. I have broke the regex into parts to make it understandable.
(?<=[A-Z]{1,}\d{1,}\s+): This is a positive lookbehind assertion (?<=) that matches a position in the string where there is a sequence of uppercase letters ([A-Z]{1,}) followed by one or more digits (\d{1,}) and one or more whitespace characters (\s+). This means it looks for a specific pattern before the actual match.
\d{1,}: This matches one or more digits. It’s the main part of the pattern that you’re capturing.
(?=\s*\d{2,}\s{1,}\d*): This is a positive lookahead assertion (?=) that matches a position in the string where there is a sequence of optional whitespace characters (\s*), followed by at least two digits (\d{2,}), then one or more whitespace characters (\s{1,}), and finally, zero or more digits (\d*). This means it looks for a specific pattern after the actual match.
If you find solution for your query please mark it as solution to close the loop.