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

Thread: get filename

  1. #1
    Regular Coder
    Join Date
    Sep 2006
    Posts
    131
    Thanks
    5
    Thanked 0 Times in 0 Posts

    get filename

    how can i get the filename from this string?

    string1 = "attachement; filename=test1234.mov"

    filename = string1.parse(.......)

    result:
    filename = test1234.mov
    ---------
    Client / Server Side Programmer II

  • #2
    Regular Coder
    Join Date
    Mar 2006
    Location
    Brasília, Brazil
    Posts
    153
    Thanks
    0
    Thanked 0 Times in 0 Posts
    if the equal sign will always be present then you split the string at it and get the second part:

    Code:
    string1 = "attachement; filename=test1234.mov"
    filename = string1.split('=')[1]


  •  

    Posting Permissions

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