Re: strip first space

2002-03-01 Thread Elaine -HFB- Ashton
[EMAIL PROTECTED] [[EMAIL PROTECTED]] quoth: *> *>$string =~ s/^\s+//; Removes leading whitespaces *> *>$string =~ s/^\s+//g; /g (GLOBALLY) is redundant in the *>case of "leading whitespages" For a beginner, it's a not a critical detail. e. -- To unsubscribe,

RE: strip first space

2002-03-01 Thread Jason Larson
> If I have a string and the first character is a space, > may not always be a space. > Example: John > Tommy > Beth > > John and Beth have a space, Tommy does not. > How do I strip that. I do not want to use the global > command because a want the space between Fir

Re: strip first space

2002-03-01 Thread William.Ampeh
$string =~ s/^\s+//; Removes leading whitespaces $string =~ s/^\s+//g; /g (GLOBALLY) is redundant in the case of "leading whitespages" See PERL Cookbook page 30 for the answer to your question. __ William Ampeh (x3939) Federal Reserve Board

Re: strip first space

2002-03-01 Thread Elaine -HFB- Ashton
Tanton Gibbs [[EMAIL PROTECTED]] quoth: *> *>The regular expression *>s/^\s//; s/^\s+//g; would be even better as it would remove all whitspace at the beginning of a line and it would replace all matches to the pattern instead of just the first it finds. e. -- To unsubscribe, e-mail: [EMAIL P

Re: strip first space

2002-03-01 Thread Tanton Gibbs
the beginning of the string \s # one space character ( space, tab, or newline ) / # and replace it with / #nothing ; - Original Message - From: "Susan Aurand" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, March 01, 2002 1:08

strip first space

2002-03-01 Thread Susan Aurand
If I have a string and the first character is a space, may not always be a space. Example: John Tommy Beth John and Beth have a space, Tommy does not. How do I strip that. I do not want to use the global command because a want the space between First and Last name.