Stripping Characters-Need Help!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • sivaraman55@gmail.com

    Stripping Characters-Need Help!

    Hi
    I have a string that looks like this
    C:\A123\DSDWE\d kdkddkdk-123.txt
    I want dkdkddkdk and 123 as two different variable values.
    How do I best achieve this using VB.NET? I have split this initially
    and looped
    over.
    But I need a best way to do this. Please help.

    Thank you

    Scotty.

  • Herfried K. Wagner [MVP]

    #2
    Re: Stripping Characters-Need Help!

    <sivaraman55@gm ail.com> schrieb:[color=blue]
    > I have a string that looks like this
    > C:\A123\DSDWE\d kdkddkdk-123.txt
    > I want dkdkddkdk and 123 as two different variable values.
    > How do I best achieve this using VB.NET? I have split this initially
    > and looped
    > over.[/color]

    You can use the 'System.IO.Path .GetFileNameWit houtExtension' method to
    extract the filename without extension and then split the string.

    --
    M S Herfried K. Wagner
    M V P <URL:http://dotnet.mvps.org/>
    V B <URL:http://classicvb.org/petition/>

    Comment

    Working...