I'm new to regex, Sorry for my noobish question
My problem is i want to group the data on the String
What i want to get is the ff:
a-zA-Zora-zA-Z0-9 (ex: abc, bzc15 but not 1abc or 14bc)0-9(ex: 1,23,56 and etc)- these operators
+*-/ - the white space
(and)
I want to group them in an array and preserve their position if possible.
Ex:
String test = "a + b + 6";
The result should be something like this
Array[0] = a
Array[1] = White Space
Array[2] = +
Array[3] = White Space
Array[4] = b
Array[5] = White Space
Array[6] = +
Array[7] = White Space
Array[8] = 6
Is this possible? If yes, what pattern should i use?
Any help will be appriciated
test.toCharArrary()i can't group data with something like thisab + b