Excluding Text Inside Arrays
in
Programming Questions
•
1 year ago
Hello
How is it possible to exclude specific text symbols that appear inside a string in an array?
I want to know if it is possible to exclude specific symbols and leave the array item as it is.
Also, how can we remove all text within two specific symbols? As in array item two in the following example, how can I remove everything between < ... >
Many thanks!
String[] manyLines = {
"one.%^&", "two <45624g*&4y3yYRERt%$$^>", "three!@£$%"
};
for (int i = 0; i < manyLines.length; i++) {
println(manyLines[i]);
//prints one.%^&
// two <45624g*&4y3yYRERt%$$^>
// three!@£$%
}
1