C# alternative to VBScript InStrRev function
Posted on 2004-10-13
I need to search a string for multiple occurences of numbers separated by a hyphen (-). A typical example would be the string "seahorse_se-120-181-3794-pr", where I need the last two sets of digits - the 181 and the 3794. These numbes are not a fixed number of digits - they can be from 1 to 4 digits in length; and because nothing is ever easy, the string in front of the numbers (the "seahorse_se-120-" in the example above) can be any length also. I am using VBScript in an ASP page right now, and the InStrRev function works fine to help me extract what I need. Is there a C# equivalent?
Thanks for your help,