-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_
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
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
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
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
> 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
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