on Tue, 13 Aug 2002 09:01:22 GMT, [EMAIL PROTECTED] (David Samuelsson) wrote:
> how do i only get the first part from this? > > RTFRT_flu@23460@\GE_Machine <- replica:GE_Machine_KI@\GE_Machine > > i get this value in $_, now i want to remove anything that is > after <- including the arrow (what i want is: > RTFRT_flu@23460@\GE_Machine) The arrow may point in the other > direction, and the digits and letters are not similar all times. > Any smart way using regexp or any other way? This gives you all: if /(.*) (<-|->) (.*)/ { $leftofarrow = $1; $arrow = $2; $rightofarrow = $3; } > Also if anyone knows a really good page where they explain usage > off regexps i would be glad, i have read the faq for regexp, and i > didnt get so much wiser, i know the basics, but i really need to > improve it. Did you read perldoc perlre -- felix -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]