So I’m using the following to split up a string:
String string_to_separate = coordinateStrings.get(i); String  separated_string = string_to_separate.split("(?<=//D)(?=//d)");
Where he coordinateStrings is a list of coordinate strings that tell where a queen is on a nxn chess board.
So for example, let’s say one of the strings is ‘a4’, I know the
part of the code will split it up to ‘a’ and ‘4’.
My question is, how does one take the ‘a’ to know there’s a queen in col ‘a’ and in row ‘4’. So like if I get another string read in that has a piece at location ‘a8’, I would know that there are 2 queens that can attack one another.
I’m just not sure if the (?<=/D)(?=/d) code makes new arrays or what, and if it makes new arrays then how would I create something to access those new arrays.
Notes: There’s always going to be a letter that comes first, and once the letters in the string ends the rest would be numbers.