How do i write a regular expression in Java which given a certain pattern, extracts the value after it and stores it in an array. If there is no value in after that pattern it should add a blank (i.e "") to the array.
As an example for pattern &&, I should get the following inputs and outputs:
input=&&&&&&&&&&
o/p=["","","",""];
input=&&A&&123&&B&&985
o/p=["A",123,B,985];
input=&& && &&A&&488
o/p=["","","A","488"]