Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8528139
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:44:11+00:00 2026-06-11T08:44:11+00:00

If consecutive uppercase words are in a document I AM ALL UPPERCASE what I

  • 0

If consecutive uppercase words are in a document “I AM ALL UPPERCASE” what I return is four seperate upper case words. What I would need is to return the whole uppercase “I AM ALL UPPERCASE”. How do i do this?

String ucParensRegEx = "\([A-Z]+\)";
if (we.getParagraphText() != null) {
    String[] dataArray = we.getParagraphText();

    for (int i = 0; i < dataArray.length; i++) {
        String data = dataArray[i].toString();
        Pattern p = Pattern.compile(regex);
        Matcher m = p.matcher(data);
        while (m.find()) {
            if (!sequences.contains(data.substring(m.start(), m.end())) && !data.equals("ARABIC") && !data.equals("ALATEC") && !data.equals("HYPERLINK")) {
                sequences.add(data.substring(m.start(), m.end()));
                System.out.println(data.substring(m.start(), m.end()));
                Acronym acc = new Acronym(data.substring(m.start(), m.end()), data, false);
                accronymList.add(acc);
            }
        }
    }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T08:44:12+00:00Added an answer on June 11, 2026 at 8:44 am

    Try "\\b([A-Z][A-Z ]+[A-Z])\\b" instead of the expression you have.

    This should match any sequence of A-Z, or spaces, as long as they are between an upper case letter and a word boundary on both sides – this should hopefully cover the full sequence of upper case words, unless you’ve got some requirements about allowing numbers in there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to reverse all string in text with 5 chars consecutive characters. For
Four consecutive bytes in a byte string together specify some value. However, only 7
How would you write this on the same line or on consecutive lines without
I have the string 111221 and want to match all sets of consecutive equal
I want to find all consecutive, repeated character blocks in a string. For example,
I want to retrieve the consecutive 8 digits out of a string. hello world,12345678anything
is it possible to send 2 consecutive TCP packets out as seen in this
I would like to perform 5 consecutive reads to a slave devices and check
I need to run different consecutive calls to a web service with no particular
I need to run different consecutive calls to a web service with no particular

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.