On Tue, 13 Aug 2002, David Samuelsson (PAC) 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?
s/(?:->|<-).*$//; This should remove the arrow and everything that follows it > > 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. Have you read through perldoc perlretut and perldoc perlre > > thanks > > //Dave > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]