I thought I should share the solution I found. Github has a fantastic library written by Tony Trin (tony19) that allows the use of named regex groups.
Taken from the project page:
"This lightweight library adds support for named capture groups in Java 5/6 (and Android).
This is a fork of the named-regexp project from Google Code (currently inactive).
https://github.com/tony19/named-regexp
I just tested this on Android 4.1.1 and above, and so far it works like a charm. I was pleasantly surprised to find that I can simply replace my import for Matcher and Pattern with classes from this library, and all my existing regular expressions that still used numbered groups still worked.
I hope this helps.
source share