Re: regex question



"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
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.
[ SNIP ]

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 posts
a
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


.



Relevant Pages

  • Re: Spirit of the Game Survey- Please Take!
    ... I think this survey has some poorly crafted questions. ... Questions # 1-4 suggestion: ... Do you want to know people's response to: ... part of the game." ...
    (rec.sport.disc)
  • Re: OT: why USA is a regime
    ... > Attributed to Bill G, Democracy, three wolves and a sheep voting on what's ... I was not referring to the *type* of government (though whether we still ... Your most recent response to him indicates that if anyone is completely ... Following that suggestion with the observation that what ...
    (comp.os.vms)
  • OT: To scoff or not to scoff
    ... almost as if scoffing is their default response to any suggestion. ... Perhaps you will go so far as to say it works by suggestion. ... while they become lactose intolerant. ... their response to bread is non-addictive. ...
    (alt.support.diabetes)
  • Re: NotinList Event
    ... tried and couldn't get it to work I did find my error and ur suggestion does, ... Private Sub Combo_NotInList(NewData As String, Response As Integer) ... Then, in the form that opens, you can set the value to the openargs ...
    (microsoft.public.access.formscoding)
  • Re: Attachment code wont work
    ... Sue's suggestion has done the trick. ... See response to her post. ... Ray ... >> ' Add attachments to the message. ...
    (microsoft.public.outlook.program_vba)