Use the $ metacharacter to match the end of a string.
In Perl, this looks like:
my $str="red/white/blue";
my($last_match) = $str =~ m/.*\/(.*)$/;
Written in JavaScript, this looks like:
var str="red/white/blue".match(/.*\/(.*)$/);
Use the $ metacharacter to match the end of a string.
In Perl, this looks like:
my $str="red/white/blue";
my($last_match) = $str =~ m/.*\/(.*)$/;
Written in JavaScript, this looks like:
var str="red/white/blue".match(/.*\/(.*)$/);