I have a string in a jList that I am looking to split with a regex (for future simplicity if requirements change)
The string looks a lot like this:
ID: GF68464, Name: productname
the ID could be any combination of letters and numbers and could be any length.
I only want the ID to be matched, i.e excluding "ID: " and anything after the comma following the ID.
Here is what I have thus far but it doesn't seem to do what I ask it to
[^ID: ][a-zA-Z1-9][^,^.]
FURTHER INFO (EDIT)
I plan on extracting the ID to match against an array. (hence the need for a regex). Could this be done a different way?