Regarding cut the string

visual studio 2005 , vb.net , string functions India
  • 12 years ago
    Dear Freind, sch_name = Replace(Txt_Filepath.Text.Trim.ToUpper.Substring(T xt_Filepath.Text.Trim.LastIndexOf("\") + 1), ".XLS", "") In sch_name get the file name 90101595958_CHQLV_FCF--%A_27092008_D. Now i want from this file FCF cut and store in another variable. Like scm_file = FCF Can u plz tell me how to do it ? Thanks nd Regards Harish Patil
  • 12 years ago
    Hi, if your file always has that pattern, then you can split the string on the dash, and then retrieve the last 3 characters of that string. Si

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“It is practically impossible to teach good programming style to students that have had prior exposure to BASIC. As potential programmers, they are mentally mutilated beyond hope of regeneration.” - E. W. Dijkstra