Results 1 to 3 of 3

Thread: [RESOLVED] [2008] Regexpression

  1. #1

    Thread Starter
    Lively Member esafwan's Avatar
    Join Date
    Apr 2008
    Location
    Bangalore-India
    Posts
    95

    Resolved [RESOLVED] [2008] Regexpression

    how do i split

    "c:\folder\document1.doc"

    to

    "document1.doc"

    i just want the file name part!
    __________

    is it possible with regex?
    Men have become the tools of their tools. - Henry David Thoreau

  2. #2
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: [2008] Regexpression

    you don't need regex.

    Code:
                Dim myFileName As String = "c:\folder\document1.doc"
                Dim justFileName As String = IO.Path.GetFileName(myFileName)
                MessageBox.Show(justFileName)

  3. #3

    Thread Starter
    Lively Member esafwan's Avatar
    Join Date
    Apr 2008
    Location
    Bangalore-India
    Posts
    95

    Resolved Re: [2008] Regexpression

    Worked! Thanx
    Men have become the tools of their tools. - Henry David Thoreau

Posting Permissions

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



Click Here to Expand Forum to Full Width