Looks like you that almost works, Tanton.  I think what he wants is:

  $string =~ s/^(.*?)Call Distance:.*/$1/;

Hope this helps...
Jason

> -----Original Message-----
> From: Tanton Gibbs [mailto:[EMAIL PROTECTED]]
> Sent: Sunday, March 10, 2002 11:29 PM
> To: Daniel Falkenberg; bob ackerman
> Cc: [EMAIL PROTECTED]
> Subject: Re: Stripping everything after words found
> 
> 
> You want to extract the LEAST possible...use
> 
> $string =~ s/^(.*?)Call Distance/$1/;
> 
> Tanton
> ----- Original Message ----- 
> From: "Daniel Falkenberg" <[EMAIL PROTECTED]>
> To: "bob ackerman" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Monday, March 11, 2002 12:26 AM
> Subject: RE: Stripping everything after words found
> 
> 
> > Bob,
> > 
> > This is what I had in the first place (($test) = $string =~ 
> /(.*)Call
> > Distance/;).  All I want to do is extract EVERYTHING before 
> the first
> > instance of Call Distance:.  From there using the same regular
> > expression I need to remove EVERYTHING after Call 
> Distance:. Including
> > Call Distance:.  So if I had the string...
> > 
> > $string = "Kind Crud Call Distance: hell world Crud Call Distance:";
> > 
> > Using a regex.  I should end up with only *Kind Crud* and 
> that is all.
> > 
> > Any ideas?
> > 
> > Kind regards,
> > 
> > Dan
> > 
> > -----Original Message-----
> > From: bob ackerman [mailto:[EMAIL PROTECTED]]
> > Sent: Monday, 11 March 2002 3:47 PM
> > To: Daniel Falkenberg
> > Cc: [EMAIL PROTECTED]
> > Subject: Re: Stripping everything after words found
> > 
> > 
> > oh - you didn't want to include 'Call Distance'? 
> > then: 
> > ($test) = $string =~ /(.*)Call Distance/; 
> > 
> > 
> > would only capture text up to 'Call Distance'. Needn't 
> worry about rest
> > of string. 
> > 
> > 
> > On Sunday, March 10, 2002, at 08:54 PM, bob ackerman wrote: 
> > 
> > 
> > how about: 
> > ($test) = $string =~ /(.*Call Distance)/; 
> > 
> > 
> > On Sunday, March 10, 2002, at 08:27 PM, Daniel Falkenberg wrote: 
> > 
> > 
> > $string = "Crud I want Call Distance more crud skdafj 
> 343sad55434 "; 
> > 
> > 
> > How would I go about getting rid of everything after the 
> Call distance 
> > and including the Call Distance? 
> > 
> > -- 
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 


CONFIDENTIALITY NOTICE:

************************************************************************

The information contained in this ELECTRONIC MAIL transmission
is confidential.  It may also be privileged work product or proprietary
information. This information is intended for the exclusive use of the
addressee(s).  If you are not the intended recipient, you are hereby
notified that any use, disclosure, dissemination, distribution [other
than to the addressee(s)], copying or taking of any action because
of this information is strictly prohibited.

************************************************************************

Reply via email to