On Wed Mar 25 2009 @ 3:10, Chas. Owens wrote:
> On Wed, Mar 25, 2009 at 13:21, Telemachus wrote:
> snip
> > my $string2 = 'remove-all-this (Keep this) remove this too';
> >
> > $string2 =~ s/.*\((.*)\)/$1/;
> snip
>
> If $string2 may contain more than one pair of parentheses, you will want
On Wed, Mar 25, 2009 at 14:47, Chap Harrison wrote:
> Thanks - I have ordered, and now received, not only Intermediate Perl but
> Perl Best Practices. Yum.
snip
It is important to keep the following bit from Perl Best Practices in mind
while reading it:
Use this book as a starting point for
On Wed, Mar 25, 2009 at 13:21, Telemachus wrote:
snip
> my $string2 = 'remove-all-this (Keep this) remove this too';
>
> $string2 =~ s/.*\((.*)\)/$1/;
snip
If $string2 may contain more than one pair of parentheses, you will want to say
$string2 =~ s/.*\((.*?)\)/$1/;
or
$string2 =~ s/.*\(
Rick Bragg wrote:
I need a quick regex to strip out the following:
Never heard of that. What is a quick regex?
--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.o
Thanks - I have ordered, and now received, not only Intermediate Perl
but Perl Best Practices. Yum.
Chap
On Mar 24, 2009, at 12:05 AM, David Christensen wrote:
Chap Harrison wrote:
Now I'm writing a suite of tools that will share a lot of the same
functionality, and the right thing to do i
On Wed Mar 25 2009 @ 12:19, Rodrick Brown wrote:
> On Wed, Mar 25, 2009 at 12:00 PM, Rick Bragg wrote:
> > I need a quick regex to strip out the following:
> >
> > example:
> > change "remove-all-this (Keep This)" into just "Keep This"
> >
>
> $s =~ s/.*\((.*)\)/$1/;
>
> > something like:
> > s/
On Wed, Mar 25, 2009 at 12:00 PM, Rick Bragg wrote:
> I need a quick regex to strip out the following:
>
> example:
> change "remove-all-this (Keep This)" into just "Keep This"
>
$s =~ s/.*\((.*)\)/$1/;
> something like:
> s/ beginning of line up to and including the first ( //g
> s/ starting fr
I need a quick regex to strip out the following:
example:
change "remove-all-this (Keep This)" into just "Keep This"
something like:
s/ beginning of line up to and including the first ( //g
s/ starting from and including first ) to end of line //g
Can anyone help with this quick line or 2?
Than
On Thu, 12 Mar 2009 17:27:25 +0200, Shlomi Fish wrote:
> I've been tutoring someone in Perl 5, and as she wants to learn Perl
> from a paperware book, she borrowed the book "Sams Teach Yourself Perl
> in 21 Days" from her workplace's library, and started reading it.
Can't your student obtain a boo