[Javascript] Code optimization

Terry Riegel riegel at clearimageonline.com
Wed Aug 16 14:23:48 CDT 2006


Hello again,

My application is progressing quite nicely. I have a problem trying  
to change a file path with javascript. I am not very good with  
regular expressions. Anyone know how to convert a string like this:


/path/to/file/...

to this:

/path/to

Basically I want to use javascript to remove the parent directory  
(..) and return the real path.


Thanks,

Terry



More information about the Javascript mailing list