I’ve got the various Strings like this “via 25 aprile 123 a” or “via 25 aprile 123a” or “via roma 123” and I want to get all the character from the last number to the end, so in the first case the result should be “123 a”, in the second case “123a”, in the third “123”.
please, Could you help me, i try with regex activity, but i couldn’t find the right expression.
thanks
Here’s a sneaky way to do it. Take your string, and reverse it (see below for the reverse method). Then use this regular expression: [^\d]+\d+. Then reverse the regex string to get the final result.
If your text is all in one file with newlines separating it, you’ll want to split the data at the newlines and do this for each line to get the data you want.
Try to never use variables of generic type, make it String and after the .Value add .ToString as well, but note that if the digit is not found in your string, you will get an exception…