Stripping Characters-Need Help!

  • Thread starter Thread starter sivaraman55
  • Start date Start date
S

sivaraman55

Hi
I have a string that looks like this
C:\A123\DSDWE\dkdkddkdk-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.
 
I have a string that looks like this
C:\A123\DSDWE\dkdkddkdk-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.

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top