lundi 30 octobre 2017

How to get whole members of regex android

My problems is about getting members of regex. Here is my code

 Pattern p = Pattern.compile("aa(a+bb)b*", Pattern.DOTALL);

Is there a any way to find&PRINT members of this regular expression for example I want to get 3 members of this (aa(a+bb)b*) expression by randomly.

For example :

aaa , aaab, aabb

or aabb, aaabbb, aabbbbbb
or aaab,aaabbb,aabbbbbbb etc.

I will be grateful if you can help

Aucun commentaire:

Enregistrer un commentaire