I couldn't see a way to get a 100% solution with just one grep run, but this works for items that have two, but not when there's three. If you run the same regex replace all multiple times it will accommodate more than two.
Find: ((\w+_\d+_\d+).*\.jpg)(\r(\2(.*\.jpg))) Replace with: \1,\4 -Kendall On Wednesday, February 20, 2013 8:47:14 PM UTC-5, Lorin Rivers wrote: > > Oh Mighty Ones, > > I have a big list that looks something like this: > speedo_705494_001.jpg > speedo_7051210_418.jpg > speedo_7051210_418_bk.jpg > speedo_7051200_041.jpg > speedo_7051200_041_bk.jpg > speedo_7051200_041_bk_a.jpg > speedo_7050911_173.jpg > speedo_7050911_173_bk.jpg > speedo_7050804_001.jpg > speedo_7050804_001_bk.jpg > speedo_705032_001.jpg > speedo_705031_001.jpg > > and I want to make it like this: > speedo_705494_001.jpg > speedo_7051210_418.jpg,speedo_7051210_418_bk.jpg > speedo_7051200_041.jpg,speedo_7051200_041_bk.jpg,speedo_7051200_041_bk_a.jpg > > speedo_7050911_173.jpg,speedo_7050911_173_bk.jpg > speedo_7050804_001.jpg,speedo_7050804_001_bk.jpg > speedo_705032_001.jpg > speedo_705031_001.jpg > > > My brain is dead and I can't figure it out. > > Anyone have a suggestion for a regex that will accomplish this? > > Thanks! > -- > Lorin Rivers > Mosasaur: Killer Technical Marketing <http://www.mosasaur.com> > <mailto:lri...@mosasaur.com <javascript:>> > 512/203.3198 (m) > > > -- -- You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to bbedit@googlegroups.com To unsubscribe from this group, send email to bbedit+unsubscr...@googlegroups.com For more options, visit this group at <http://groups.google.com/group/bbedit?hl=en> If you have a feature request or would like to report a problem, please email "supp...@barebones.com" rather than posting to the group. Follow @bbedit on Twitter: <http://www.twitter.com/bbedit> --- You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to bbedit+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.