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

  • Home
  • SEARCH
  • 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 7687709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:45:50+00:00 2026-05-31T19:45:50+00:00

is ist possible to tell String.split(() function that it has to split only by

  • 0

is ist possible to tell String.split(“(“) function that it has to split only by the first found string “(“?

Example:

String test = "A*B(A+B)+A*(A+B)";
test.split("(") should result to ["A*B" ,"A+B)+A*(A+B)"]
test.split(")") should result to ["A*B(A+B" ,"+A*(A+B)"]
  • 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-05-31T19:45:51+00:00Added an answer on May 31, 2026 at 7:45 pm

    Yes, absolutely:

    test.split("\\(", 2);
    

    As the documentation for String.split(String,int) explains:

    The limit parameter controls the number of times the
    pattern is applied and therefore affects the length of the resulting
    array. If the limit n is greater than zero then the pattern
    will be applied at most n – 1 times, the array’s
    length will be no greater than n, and the array’s last entry
    will contain all input beyond the last matched delimiter.

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

Sidebar

Related Questions

is it possible to insert the word that was found into the replace ?
ist it possible to do a 10-fold cross-validation with svmmulticlass or do I have
Is ist possible to Start a Tomcat with Maven without stopping Tomcat after Maven
Ist there a possibility to do something like that: int selected_value = Dialog(This dialog
I usually use StructureMap in v 2.5. I think that v2.0 ist compatible to
I have a String: Sun May 15 00:00:00 IST 2011 Now if I want
below is a code example and the question, please note that I can NOT
I am creating a web solution that should run on two different web addresses.
I need to convert the Python string Mon Aug 29 2011 18:30:00 GMT+0530 (IST)
I noticed, that in [24.4.7] of the last C++-Std Doc N3291 max ist not

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.