Hi Team,
Can you please help me in getting the last value of the below string using regex ?
01-Jan-2020 31-Jan-2020 £ 390 - 23 £ 8,970
Hi Team,
Can you please help me in getting the last value of the below string using regex ?
01-Jan-2020 31-Jan-2020 £ 390 - 23 £ 8,970
will the format of date remains same?/
@mc00476004, Mention whats the text you are trying to extract.
Also let me know if regex is the only option or alternate solution is acceptable.
The date format will remain the same, I have tried the below, but it is matching two values, but I need only the last value
The Last amount value with the currency symbol, Yes alternative solution is acceptable.
Thank you!
Use the below vb.net function
inputstr.trim.tostring.split("£"c).Last
Use assign, pass the function to right side and get the expected value on the left
Thank you !
Hi
With Regex
stroutput = System.Text.RegularExpressions.Regex.Match(strinput.ToString,”(\d\W\d+)+$”).ToString.Trim
With split method
Stroutput = Split(strinput.ToString,” “).Last().ToString.Trim
Cheers @mc00476004
Pradeep, This is working only for this string but if anything gets added in between this expression does not match. Thank you for your help bud!
I used this and this works perfectly fine
Hey Palaniyappan,
Thank you this works fine