String stringToSearch = "About ||PrimarySchool|| % of children in ||Country|| attend primary school. ||SecondarySchoolFemale|| % of girls and ||SecondarySchoolMale|| % of boys finish secondary school. Literacy is ||LiteracyFemale|| % for females and ||LiteracyMale|| % for males.";
I want extra string between two special characters like ||anystring||
, but it is not working. I tried to use Pattern-Matcher of Java but it is not working - it returns an empty array.
I have tried to follow Java- Extract part of a string between two special characters.
Pattern pattern = Pattern.compile("||(.*?)||");