Check out example codes for "splitting using regex java". It will help you in understanding the concepts better.

Code Example 1

Pattern p = Pattern.compile("(\\d+)|([a-zA-Z]+)");
Matcher m = p.matcher("810LN15");
List<String> tokens = new LinkedList<String>();
  String token = 1 ); //group 0 is always the entire match   
//now iterate through 'tokens' and check whether you have a number or text

Learn ReactJs, React Native from