Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jul 2006
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Leading non digits are cut off

    I want to cut off all leading Charecters in a string
    Ie if a string s=”ADX135”
    I want to get 135 only
    Ie all Leading non digits are cut off

    How can I dothis
    In .NET2

    sujith

  • #2
    Regular Coder
    Join Date
    May 2006
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If your string has always the same structure, 3 letters following by 3 digits, you can use the Substring method:
    Code:
    Dim s As String = "ADX135"
    s = s.Substring(3)
    Response.Write(s) 's="135"


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •