RE: Deleting leading/trailing whitespace

2001-08-08 Thread Bob Showalter
> -Original Message- > From: Sophia Corwell [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 08, 2001 2:56 PM > To: [EMAIL PROTECTED] > Subject: Deleting leading/trailing whitespace > > > Is there a way to delete leading/trailing whitespace > in one fly? > > I have the following: >

Re: Deleting leading/trailing whitespace

2001-08-08 Thread Adam Turoff
On Wed, Aug 08, 2001 at 02:24:39PM -0500, Mooney Christophe-CMOONEY1 wrote: > > From: Sudarsan Raghavan [mailto:[EMAIL PROTECTED]] > > Sent: Wednesday, August 08, 2001 1:48 PM > > To: Sophia Corwell > > Cc: [EMAIL PROTECTED] > > Subject: Re: Deleting leading/trailing

RE: Deleting leading/trailing whitespace

2001-08-08 Thread Mooney Christophe-CMOONEY1
> From: Sudarsan Raghavan [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, August 08, 2001 1:48 PM > To: Sophia Corwell > Cc: [EMAIL PROTECTED] > Subject: Re: Deleting leading/trailing whitespace > > > ($temp) = $temp =~ m/^\s+(\S*)\s+$/; No, because this won'

Re: Deleting leading/trailing whitespace

2001-08-08 Thread Michael Fowler
On Wed, Aug 08, 2001 at 11:55:42AM -0700, Sophia Corwell wrote: > $temp =~ s/^\s+//; # Removing leading spaces > $temp =~ s/\s+$//; # Removing trailing spaces > > Is there a way to combine these two statements into one? There is, as has been mentioned by John Way. However, unless you have some

Re: Deleting leading/trailing whitespace

2001-08-08 Thread Sudarsan Raghavan
($temp) = $temp =~ m/^\s+(\S*)\s+$/; regards, Sudarsan Sophia Corwell wrote: > Is there a way to delete leading/trailing whitespace > in one fly? > > I have the following: > > $temp =~ s/^\s+//; # Removing leading spaces > $temp =~ s/\s+$//; # Removing trailing spaces > > Is there a way to com

Re: Deleting leading/trailing whitespace

2001-08-08 Thread John Way
try this... $string = " text "; print "Before regex:\"$string\""; $string =~ s/^\s+|\s+$//g; print "After regex:\"$string\""; (the "|" indicates an OR) John Way Confidentiality Notice: *** Privileged/Confidential information may be contained