We always assume that the whole path starts with / But the path can be some/path/to/filename also! In that case this will definitely fail. I am scratching my head as to what kind of check to put in for that. Helllp!! :)this can work right ? /fjsdklf/fjsldkfs/fsjdklf-fs-0-fsf/../fjskfjs/.. +/../../fsfkslf/filename ../../../../filename ../hello dofghello/two/forut/../filename2 Will this work ../../../../jfsdfjskdlfjs/../fjsklf/fjksfjskflsd/filena +me I will do replacement for ../filename this can work right /fjsdklf/fjsldkfs/fsjdklf-fs-0-fsf/../fjskfjs/../ +../../fsfkslf/filename I will think of even/more/silly/../../harder/cases/../analysis/filenam +e and do it ../twice as well as put/some/path/and/make/it/thrice
In reply to Okay, I know why is it failing
by tsk1979
in thread This regular expression has me stumped
by tsk1979
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |