samedi 25 août 2018

Regex, How capture repeating pattern with a condition

I have many Strings

1) "book = 12 AND x2 = 50 AND cost = 45"

2) "pen = 1 AND case = 10 AND bala = 40"

.

.

.

And I need to get 'book' , 'x2', 'cost' And 'pen' , 'case', 'bala'

I use this but not work.

(?:(.*?)(?==))+

Aucun commentaire:

Enregistrer un commentaire