Dear All,

Please Help me in this application.... My problem is that i want to select the required text from the following text.
In this text I want When user input following text. I will get only special information from it.

Abdoul Amin

23 av Olympiades 94120 FONTENAY SOUS BOIS [Plan Itinéraire] [Opposé au marketing direct] 01 75 37 93 50 [Sauvegarder Partager] [Envoyer une carte personnalisée] [3] [C'est vous ?]

My Special Information which i want in the above text is

Abdoul Amin , 23 av 0lympiades, 94120 Fontenay sous Bios, 01 75 37, 93, 50

And all other information will be truncated..................

Any One please help me... I am really very thankful..

Split the String from [ and ]. Then from 0th and 4th indexes you can get what you want

FYI,

String arr[] = yourString.split("[\\[\\]]");  
// arr[0] and arr[4] will be what you want
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.