Quantcast
Channel: CodeProject Latest postings for Regular Expressions
Viewing all articles
Browse latest Browse all 224

Case Conversion Regular Expression in JAVA 8

$
0
0
Hi Community,

I have come to the conclusion that it may not to be possible to change the case of a string in JAVA 8 as simply as it is to change the case in say Perl.

However, before I move on, I just wanted to have someone on this forum confirm its not possible to change the case in JAVA 8 as follows:

Insert the whole regex match or the 1st through 99th backreference with the first letter of each word in the matched text converted to uppercase and the remaining letters converted to lowercase.

Example

Replacing .+ with \I0 in HeLlO WoRlD yields Hello World

Can someone confirm that the above isn't possible with JAVA 8?

If its not possible, can someone let me know how to achieve the above with JAVA 8?

Thanks

Viewing all articles
Browse latest Browse all 224

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>