Mesut_Can
(Mesut Can)
January 27, 2024, 2:45pm
1
Hi,
16.01.2024 7** İ* G* E* M* 86904.47 86747.34 157.13
21.01.2024 4** M* S* K* P* 57621.26 0 57621.26
21.01.2024 5** M* G* T* P* İ* 27618.83 867 27618.83
** > There may be 3 or 4 numbers, for example 780 or 7808.
$*$ > More than one font and word may appear.
I want to get the last digits.
Is there any regex or other way?
157.13
57621.26
27618.83
mkankatala
(Mahesh Kankatala)
January 27, 2024, 2:47pm
2
Mesut_Can:
16.01.2024 7** İ* G* E* M* 86904.47 86747.34 157.13
21.01.2024 4** M* S* K* P* 57621.26 0 57621.26
21.01.2024 5** M* G* T* P* İ* 27618.83 867 27618.83
Hi @Mesut_Can
Try the below regex
System.Text.RegularExpressions.Regex.Matches(Input.toString,"[\d\.?]+$")
Check the below image for better understanding,
Hope it helps!!T
mkankatala
(Mahesh Kankatala)
January 27, 2024, 3:03pm
4
It’s working for me.
In the Pattern options of Find Matching Patterns activity check the IgnoreCase, Multiline and compiled.
Now try executing this. I changed the regex check with the new regex.
[\d\.?]+$
If not works by changing the above options let me know.
Hope you understand!!
Mesut_Can
(Mesut Can)
January 27, 2024, 3:17pm
5
Thank you very much for your answers, but I couldn’t figure it out.
mkankatala
(Mahesh Kankatala)
January 27, 2024, 3:19pm
6
Hello @Mesut_Can
If the above regex will not work try the below one, it is also working,
"(\d+(\.\d+)?\s*)$"
In the Properties of Find Matching Patterns activity keep the Multiline, Compiled and Ignore Case options in the Pattern options.
Check the below image for the output,
Hope it works for sure!!
1 Like
Mesut_Can
(Mesut Can)
January 27, 2024, 3:32pm
7
Yessss, its work. Thank you very much.
Can I ask one last question?
21.01.2024 4** M* S* K* P* 57621.26 0 57621.26
2(2).01.2024 4** M* S* K* P* 57621.26 0 (-)57621.26
In other words, in the line below, it is just the date and the last digit minus the same. How can I delete two records like this with replace?
mkankatala
(Mahesh Kankatala)
January 27, 2024, 3:41pm
8
Hi @Mesut_Can
Can you be more specific?
Regards
Mesut_Can
(Mesut Can)
January 27, 2024, 3:50pm
9
There are two records in the file. In the second one, the date changes and only the last digit is preceded by a minus sign. I want to delete these two statements.
21.01.2024 57621.26
22.01.2024 -57621.26
mkankatala
(Mahesh Kankatala)
January 27, 2024, 4:13pm
10
Hi @Mesut_Can
Can you provide sample text file.
Regards
Mesut_Can
(Mesut Can)
January 27, 2024, 8:52pm
11
For example, I have 4 records as below.
In the last two records, the date and last digit are minus compared to the previous record. These records are of no use to me. I want it deleted. The two records shown in the other image should remain.
system
(system)
Closed
January 30, 2024, 8:52pm
12
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.