Got a string I am getting from a webpage. It includes an incident number followed by the words “incident description” I want to remove everything expect the numbers.
I am using the community addition. I don’t think I have access to things like .trim or .substring. If I do they are not auto filling. Am I missing something?
The Problem might be you are trying it on “Generic” data type. Not sure but may be. If you will use it with string Data type variable then you will be able to see it or you can try like this as well
Hi vvaidya,
You had me curious with your previous solution.
I think you needed “AddressOf Char.IsDigit” to make it work after doing research.
Here’s what I ended up with (“text” being variable with the string): String.Concat(text.Where(AddressOf Char.IsDigit))
and IsDigit can be replaced with other booleans
That is supposedly faster than Regex but I think both solutions work.