Rahul Pandit.
Published in : 2022-03-05

How can I split a given String into a pattern consisting of uppercase and lowercase alphabets in Java?

Javascript

Given a String S, I want to find a string containing one lowercase letter and one uppercase letter for the alphabet.

If S = "aAbBcdEec", I want to get "aAbB" and "Ee".

And if S = "abcABCadD", I want to get "abcABC" and "dD".

I've been thinking of StringBuilder or Pattern as a way to solve this, but to no avail.

I don't even need code to solve this, can you guys give me a hint?

Comments

Shilpa Date : 2022-03-05

Best answers

10

Best answers

10

You are looking answer for java, not javascript

Also, share your code or show your efforts!

Leave a comment

Join us

Join our community and get the chance to solve your code issues & share your opinion with us

Sign up Now

Related posts

Simple HTML date picker is showing not showing calendar icon!
Publish date: 2022-03-01 | Comments: 2

Tag: Javascript

Can we add a javascript or jQuery to the URL?
Publish date: 2022-03-05 | Comments: 2

Tag: Javascript

How do I check if an array includes a value in JavaScript?
Publish date: 2022-02-13 | Comments: 2

Tag: Javascript

How to get audio input and audio output as one stream?
Publish date: 2022-02-13 | Comments: 2

Tag: Javascript

Javascript Add (+) issue
Publish date: 2022-02-26 | Comments: 1

Tag: Javascript

What is the use of package-lock JSON file?
Publish date: 2022-02-11 | Comments: 3

Tag: Javascript

How to toggle ( show and hide ) divs according to day hours?
Publish date: 2022-02-13 | Comments: 1

Tag: Javascript

Method refactoring to avoid to many npe checks
Publish date: 2022-03-05 | Comments: 0

Tag: Javascript