in reply to Re: How do i convert uppercase in a bracket.
in thread How do i convert uppercase in a bracket.

Sorry i just read i posted the wrong thing. I wanted I_Need_Help instead how do i do that?
  • Comment on Re^2: How do i convert uppercase in a bracket.

Replies are listed 'Best First'.
Re^3: How do i convert uppercase in a bracket.
by reasonablekeith (Deacon) on May 06, 2005 at 13:23 UTC
    $string =~ s/([a-z]+)/ucfirst(lc($1))/ieg;
    would give you 'I_Need_(Help)'
    I'm sure you can strip the brackets for yourself...

    as an aside, when posting code it should be inside <code></code> tags, I guess you had a character class in your original regex, which has been garbled by the perlmonk's own-brand markup.

    ---
    my name's not Keith, and I'm not reasonable.
      Thank you. It works.
Re^3: How do i convert uppercase in a bracket.
by Fletch (Bishop) on May 06, 2005 at 13:10 UTC

    perldoc -f split, perldoc -f map, perldoc -f lcfirst, perldoc -f join.