I know nothing about regularExrpessions, yet I think what you ask can be easily accomplished by checking the previous char of a char and setting the latter to uppercase if the previous one is one of the delimiters. You just loop through your string and use the charAt function.