Last numbers from a string RRS feed

  • Question

  • User-1427396445 posted

    I need a vb function to determine the last numerical characters in a string. For example, if the string is Step1, I need it to return 1. If the string is Step32, I need it to return 32.

    I'm aware of the string functions like Right, Instr, etc but I'm just not sure how to get what I need. Any suggestions?

    Wednesday, August 25, 2010 1:06 AM


  • User-1427396445 posted

    I figured out a solution. Take the last two characters, regardless of what they are. Then use a regex and replace all non-numeric characters Smile

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, August 25, 2010 7:12 AM