On Dec 12, Abigail said:
>On Thu, Dec 12, 2002 at 12:48:11AM -0500, Jeff 'japhy' Pinyan wrote:
>> On Dec 12, Jonathan E. Paton said:
>>
>> >(my $sql = << '--') =~ s/\A(\s+)(?{$::c = $^N})|^(??{$::c})//gm;
>> >
>> >all over SQL related source code then your head is on the block!
>>
>> While it's cool, and I'D use it, for readability purposes, might I
>> suggest:
>>
>> $sql =~ /(\s*)/ and $sql =~ s/^$1//mg;
>
>The question was how to do it in one regex; the original poster
>already knew how to do it with two regexes.
Yes, that's all well and good. Your one-regex solution is the way I would
do it (with one regex too), but if you're going to use two regexes, I'd
use my method.
--
Jeff "japhy" Pinyan [EMAIL PROTECTED] http://www.pobox.com/~japhy/
RPI Acacia brother #734 http://www.perlmonks.org/ http://www.cpan.org/
<stu> what does y/// stand for? <tenderpuss> why, yansliterate of course.
[ I'm looking for programming work. If you like my work, let me know. ]