I trying out using regEx to split a String which gives me an array with 2 items in it.
I am only really interested in the first element, however the debugger is reporting that it has nothing in(in yellow circle on screenshot) it but has a “value” of the item I matched in my Regex. (highlighted in blue on screenshot)

How do I programmatically get to the value?
Here is the code I am using:
//Handle Related description by stripping off data relating to it
String[] descriptionShortened=jsonObject.getString("description").split("^.*[^Related]");
String descriptionintro=descriptionShortened[0].toString();
descriptionList.add(descriptionintro);
[^Related] Matches a Character Class which matches everything except the letters R, e, l, a, t, e, d. Your regex will match anything and that’s why the first element of the array is empty. If you wanted to a string that has everything before the string “Related”, just call
Everything before the string
"Related"will be in the first element in the array that is returned. For instance, ifjsonObject.getString("description")returns"abcdRelatedefgh", the code above would return an array{ "abcd", "efgh" }.In regards to your first question and the screenshot, that String really is empty. The value is a pointer, but it’s pointing to empty space. Every String has a value field, but that doesn’t mean that it’s not empty.