"David" <[EMAIL PROTECTED]> wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello All,
> 
> I am beginner and need some helps. Thanks a lot!
> 
> The question is, if I have a string, for example
> "C:\PerlScripts\TestSamples\StringTest.pl", how do I use regexp to parse
> this string and get substring after the last backslash ("StringTest.pl").

Hey David,
  This should work for you:

use strict;
my $String='C:\PerlScripts\TestSamples\StringTest.pl';
(my $substring =$string) =~s/.*\\(.*)/$1/;

Shawn


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to