Or you could always split on your token separator and grab the last element in the resulting array.#!/usr/local/bin/perl use strict; my $string = '/one/two and three/and four / and five'; if ($string =~ /.*\/(.*?)$/) { print "Last token: $1\n"; }
In reply to Re^3: Regular Expression Help
by ptum
in thread Regular Expression Help
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |