fork download
  1. class Ideone {
  2. static void main(String[] args) {
  3. String commitMsg = "#build #images = image-a, image-b,image_c, imaged , image-e #setup=my-setup fixing issue with px"
  4. def re = /(?i)(?:\G(?!^)\s?,\s?|#images\s?=\s?)(\w+(?:-\w+)*)/
  5. def matcher = (commitMsg =~ re).collect()
  6. for(m in matcher) {
  7. println(m[1])
  8. }
  9. }
  10. }
  11.  
Success #stdin #stdout 1.92s 141388KB
stdin
Standard input is empty
stdout
image-a
image-b
image_c
imaged
image-e