![]() |
In Java, we can use regular expressions to make the first character of each word in Uppercase as the word is represented as a String and string is the collection of characters. So, in Java, we can use pattern and matcher class methods to find the first character of a word and then replace it with its uppercase letter. In this article, we will discuss how to make the first character of each word in Uppercase using regex. Example of Converting the first character of each word in Uppercase
Program to Make the First Character of Each Word in Uppercase Using RegexBelow is the Regular Expression to make the first character of each word in Uppercase. Java
Output
Geeks For Geeks Explanation:
|
Reffered: https://www.geeksforgeeks.org
Java |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 10 |