Re: getting rid of whitespace at the beginning and end of a string

2003-12-12 Thread John W. Krahn
Dan Anderson wrote: > > Is there a way to chomp all whitespace both at the beginning and end of > a string? That is what is known as a Frequently Asked Question or FAQ. Perl provides copious amounts of documentation including a large list of FAQs in the perlfaq.pod file. Perl also provides a pr

RE: getting rid of whitespace at the beginning and end of a string

2003-12-12 Thread Charles K. Clarkson
Dan Anderson <[EMAIL PROTECTED]> wrote: : Is there a way to chomp all whitespace both at the beginning : and end of a string? I was thinking of using a regexp like : s[^\s*?][]sg and s[\s*?$][]sg; Is there a better way? : (I'm thinking of PHP's trim function) See perlfaq4: How do I strip bla

Re: getting rid of whitespace at the beginning and end of a string

2003-12-12 Thread James Edward Gray II
On Dec 12, 2003, at 1:51 PM, Dan Anderson wrote: Is there a way to chomp all whitespace both at the beginning and end of a string? I was thinking of using a regexp like s[^\s*?][]sg and s[\s*?$][]sg; Is there a better way? (I'm thinking of PHP's trim function) I imagine so because I don't think

Re: getting rid of whitespace at the beginning and end of a string

2003-12-12 Thread drieux
On Dec 12, 2003, at 11:51 AM, Dan Anderson wrote: Is there a way to chomp all whitespace both at the beginning and end of a string? I was thinking of using a regexp like s[^\s*?][]sg and s[\s*?$][]sg; Is there a better way? (I'm thinking of PHP's trim function) the traditional path is

getting rid of whitespace at the beginning and end of a string

2003-12-12 Thread Dan Anderson
Is there a way to chomp all whitespace both at the beginning and end of a string? I was thinking of using a regexp like s[^\s*?][]sg and s[\s*?$][]sg; Is there a better way? (I'm thinking of PHP's trim function) -Dan -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mai