我想匹配并在一行中分配一个变量:
my $abspath='/var/ftp/path/to/file.txt'; $abspath =~ #/var/ftp/(.*)$#; my $relpath=$1;
我相信一定很容易.
regex perl
perl ×1
regex ×1