Hi All;
How can I get only the values after the last equals(=) from mixed Texts in this way?
The number of values taken in this example is: 8.
\b([\d+,.]+) -->I tried that, it didn't work.
beton = 125x2:250 = 250 m³
= 20 m³
beton : (125x2=250) = 250 m³
= 85
= 15.20
=13.25m²
Kalıp : 100x2=200 + 150*2=300 = 500
100x2=200 + 200*2=400 = 600
Solved! Go to Solution.
Solved by _gile. Go to Solution.
Hi,
If you want to capture the last number in the string, you can use RegexOptions.RightToLeft
> var regex = new Regex(@"(-?\d+(?:\.\d+)?)", RegexOptions.RightToLeft);
> regex.Match("beton = 125x2:250 = 250 m³").Captures[0].Value
"250"
> regex.Match("beton : (125x2=250) = 250 m³").Captures[0].Value
"250"
> regex.Match("= 15.20").Captures[0].Value
"15.20"
> regex.Match("=13.25m²").Captures[0].Value
"13.25"
> regex.Match("Kalıp : 100x2=200 + 150*2=300 = 500").Captures[0].Value
"500"
Hi
I keep these text values in a List, i.e. all lines of text. How should I arrange in this case?
I'll take the totals.
*******************************************************************
okay i did it. Thank you very much, sir.
Can't find what you're looking for? Ask the community or share your knowledge.