Update pattern.c

Change to comma seperated output