Quick regexp help!

2002-08-13 Thread David Samuelsson (PAC)
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

Re: Quick regexp help!

2002-08-13 Thread Connie Chan
> 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 di

Re: Quick regexp help!

2002-08-13 Thread Sudarshan Raghavan
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

Re: Quick regexp help!

2002-08-13 Thread Sudarshan Raghavan
On Tue, 13 Aug 2002, Connie Chan wrote: > regex method : > $_ =~ s/^(.+)<\-(.+)$/$1/; 1) By default the regex engine tries to match the contents of $_, so your statement can be written as s/^(.+)<\-(.+)$/$1/; 2) You don't have to escape '-' in this case, it assumes a special meaning o

Re: Quick regexp help!

2002-08-13 Thread Felix Geerinckx
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 (wha

Re: Quick regexp help!

2002-08-13 Thread John W. Krahn
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

RE: Quick regexp help!

2002-08-13 Thread David Samuelsson (PAC)
-Original Message- From: Felix Geerinckx [mailto:[EMAIL PROTECTED]] Sent: den 13 augusti 2002 11:56 To: [EMAIL PROTECTED] Subject: Re: Quick regexp help! 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_