OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Extracting words that has specific casing using Python [closed]

  • Thread starter Thread starter codex
  • Start date Start date
C

codex

Guest
It is given that I have a paragraph and it contains the all types of string in terms of upper case, lower case and camel case strings/words, I have to extract all the words/strings from that paragraph which are completely written in upeer case Below is the explanation with example. I have the strings:

Code:
S1 = "ABC is the text"
I need output as "ABC" only

Another example:

Code:
S2="LTE Is Getting Evolved"
output: LTE

InputString =
"ACK ACKnowledgment
ACRRAMN Artificial
ANR123 Automatic NR Relations
124APN Access Point Name
A12RQ Automatic Repeat reQuest
BP Bandwidth Part XZ"

output:

ACK
ACRRAMN
ANR123
NR
124APN
A12RQ
BP
XZ

The case is I need only the UPPER CASE string not that has the Upper Case as a part of the string.
<p>It is given that I have a paragraph and it contains the all types of string in terms of upper case, lower case and camel case strings/words, I have to extract all the words/strings from that paragraph which are completely written in upeer case
Below is the explanation with example.
<strong>I have the strings:</strong></p>
<pre><code>S1 = "ABC is the text"
I need output as "ABC" only
</code></pre>
<p><strong>Another example:</strong></p>
<pre><code>S2="LTE Is Getting Evolved"
output: LTE

InputString =
"ACK ACKnowledgment
ACRRAMN Artificial
ANR123 Automatic NR Relations
124APN Access Point Name
A12RQ Automatic Repeat reQuest
BP Bandwidth Part XZ"

output:

ACK
ACRRAMN
ANR123
NR
124APN
A12RQ
BP
XZ
</code></pre>
<p><em>The case is I need only the UPPER CASE string not that has the Upper Case as a part of the string.</em></p>
 

Latest posts

Online statistics

Members online
1
Guests online
4
Total visitors
5
Top