Re: regex question
- From: "Bill Segraves" <segraves_f13@xxxxxxxxxxxxxx>
- Date: Sat, 02 Dec 2006 20:12:06 GMT
"Arved Sandstrom" <asandstrom@xxxxxxxxxxxxx> wrote in message
news:e49ch.18330$rv4.7508@xxxxxxxxxxx
"Bill Segraves" <bill.segraves@xxxxxxxxx> wrote in message
news:1164967167.059114.101040@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
[ SNIP ]
Note to OP: The above (proposed) solution produces the result[ SNIP ]
aLONG_OBJECT_NAME, which is not the specified result. A correct
solution, with explanation of why the above approach fails, was given
in another response to the OP's post.
Worth pointing out that a test taking perhaps a minute would have sufficed
to show that the
$str =~ s/_(\w+)/\U$1/g;
as suggested by Steven Kuo, in his response to googler,
doesn't do the trick. Your solution follows. The point being, if one postsa
code snippet that one purports to work, one should actually test it.
Thanks, Arved. Your are indeed correct.
Personally, I was reluctant to point out to the respondent, Steven Kuo, what
I felt should have been obvious to him, as well as to the OP, after reading
my responses. Thanks to your suggestion, googler and Steven Kuo needn't have
to infer, from what I wrote, the point that you stated explicitly.
BTW, I tested all of the variations that were mentioned, before copying &
pasting the results into my postings.
Cheers,
--
Bill Segraves
.
- Follow-Ups:
- Re: regex question
- From: Arved Sandstrom
- Re: regex question
- References:
- regex question
- From: googler
- Re: regex question
- From: attn.steven.kuo@xxxxxxxxx
- Re: regex question
- From: Bill Segraves
- Re: regex question
- From: Arved Sandstrom
- regex question
- Prev by Date: FAQ 2.17 What is perl.com? Perl Mongers? pm.org? perl.org? cpan.org?
- Next by Date: Replacing variable names with values via reference in regexp
- Previous by thread: Re: regex question
- Next by thread: Re: regex question
- Index(es):
Relevant Pages
|