Henry Vuong

Henry Vuong

  • NA
  • 27
  • 0

Convert parts of the string into lower case

Nov 21 2012 11:42 AM
I have a string like this:

string str = "[Title] [A] The GODFATHER [B] Inception [C] Finding Nemo [D] BRAVE [/Title]";

I want to convert all the characters inside the square brackets into lower case, like so:

"[title] [a] The GODFATHER [b] Inception [c] Finding Nemo [d] BRAVE [/title]"

I am thinking of using regular expression but not sure how to use it. Please advice.

Answers (1)