"DeeDee Messersmith" schreef:

> I have strings such as the following:
> 
> .INSERT,SCREW THREAD..............
> 
> I need the leading dots but not the trailing. As you see it has
> commas and spaces in it so the traditional \w doesn't work. the .*
> doesn't work as it picks up the trailing dots. The result I want back
> is:   
> 
> .INSERT,SCREW THREAD

  my $in = ".INSERT,SCREW THREAD..............";
  (my $out) = $in =~ m/(.*[^.])/;
  print $out;

-- 
Affijn, Ruud

"Gewoon is een tijger."

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to