Sekhar, try this
my $string = '/install/sql/foo.c@@/main/integration/1';
$string =~ s/^.*\/(.*)[EMAIL PROTECTED]@.*/$1/;
print $string,"\n";
I took advantage of .* being greedy.
Regards,
****************************************************************************************
Sam Dela Cruz
|
sekhar kavuru <[EMAIL PROTECTED]> Sent by:
10/28/2005 08:51 AM |
|
Hi All
I need a REGEX to get a string between two characters from a static string
e.g. /install/sql/foo.c@@/main/integration/1
I need to get foo.c , i.e string between / and @@
First it needs find where @@ occurs in the string and trace back to file name until it encounters / character.
thanks
sk
Yahoo! FareChase - Search multiple travel sites in one click. _______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
_______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
