comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » extracting all but...
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
extracting all but... [message #46307] Fri, 18 November 2005 18:15 Go to previous message
Koh Leong Tah is currently offline  Koh Leong Tah
Messages: 11
Registered: May 2005
Junior Member
Hi All,

I was wondering how I can extract all but a constant string from an
array of strings?
basically, I have an array of filenames with a particular directory
prefixed to each of the filenames like so:

files =
['/some/constant/directory/file1','/some/constant/directory/ file2',
etc.]

and would like to have just an array of the filenames without the
prefixed directory name so that the result looks like:

files = ['file1', 'file2', etc.]


any ideas?

Cheers,
KL
[Message index]
 
Read Message
Read Message
Previous Topic: extracting strings between ' '
Next Topic: Changing tag definition/type

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:13:25 PDT 2025

Total time taken to generate the page: 0.00576 seconds