'Filtering and extracting values in groovy

 def data=   """
    The values for MASTER as follows
    MASTER  : 1111,2222two,333Three  ,4four
      MASTER : 5555
      MASTER:  666
    """

//do code

println data should be list of all values: (1111,2222two,333Three,4four,5555,666)

I wanted to extract all vales of "MASTER:" and store in List so I can use it for other process, any help on this would be helpful



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source