mercredi 5 août 2015

A regex that matches all L3_SW_xxxx,where xxxx are numbers


I am trying to create a java regex that matches all the words from a string that start with L3_SW_ and end with a set of numbers.The regex i came up with only matches the first word in the string.I am trying to get all the matches,but I can't figure it out.

My regex is : (L3_SW_)\d+

String sample :L3_SW_NORM_92 - L3_SW_NORM_100 L3_SW_691, L3_SW_694 L3_SW_844, L3_SW_845

L3_SW_882, L3_SW_883, L3_SW_884 L3_SW_790, L3_SW_3014, L3_SW_3015

The result i am getting :L3_SW_691



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire