fork download
  1. s = [[# objects {
  2. objects = build/somefile1.o \
  3.   build/somefile2.o \
  4.   ...
  5.   build/somefileN.o \
  6.  
  7. # } objects
  8. More lines
  9. here and there
  10. # objects {
  11. objects = build2/somefile1.o \
  12.   build2/somefile2.o \
  13.   ...
  14.   build2/somefileN.o \
  15.  
  16. # } objects]]
  17. for m in string.gmatch("\n" .. s, "\n(# objects %b{} objects)") do
  18. print("---- NEW MATCH FOUND -----")
  19. print(m)
  20. end
  21.  
Success #stdin #stdout 0s 2844KB
stdin
Standard input is empty
stdout
---- NEW MATCH FOUND -----
# objects {
objects = build/somefile1.o \
          build/somefile2.o \
          ...
          build/somefileN.o \

# } objects
---- NEW MATCH FOUND -----
# objects {
objects = build2/somefile1.o \
          build2/somefile2.o \
          ...
          build2/somefileN.o \

# } objects