|
|
Joined: Jan 2000
Posts: 5,073
Admin Emeritus
|
Admin Emeritus
Joined: Jan 2000
Posts: 5,073 |
Solution: $Path =~ m!/([^/]+)$!gi; my $value = $1;
Explained: m! Start a match, delimiter is !.
/ A slash
( Start a group
[^/] A single character that is not a forward slash
One or more of the previous single character +
) End group
$ End of string
!gi; End regex. Make pattern searching global and case insensitive.
The value inside the first group is automagically stuck into $1 by Perl.
UBB.classic: Love it or hate it, it was mine.
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 254
Joined: January 2000
|
|
Forums63
Topics37,575
Posts293,932
Members13,824
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|