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?