这应该在Perl中完成:
my ($last) = $url =~ /([^\/]+)\z/;
Run Code Online (Sandbox Code Playgroud)
但我宁愿使用该URI模块:
my $last = (URI->new($url)->path_segments)[-1];
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
497 次 |
| 最近记录: |