- - PR -
perl question: ".." buster
1
投稿者 | 投稿内容 | ||||
---|---|---|---|---|---|
|
投稿日時: 2002-01-23 11:17
here's a perl script that normalizes a path by removing ".."
e.g. $_ = "/usr/lib/perl/../../../junk"; my $re = qr{ ([^/\.]+) / (\.\.) }x; while ( s{(/$re|$re/)}{}g ) { ; } (double \ should read single: a known @IT会議室 bug ![]() can you do the same task using a recursive regex pattern? | ||||
|
投稿日時: 2002-01-29 04:11
seems working |
1