Is there a way to script BBEdit to find text in one place, copy a part of it then find text elsewhere and paste the previously copied text into the other found text? Multiple times?
I am downloading hundreds of recordings from my TiVo DVRs and each is accompanied by a text file of metadata. One line in that text file will be of the form: originalAirDate : 2009-04-06T00:00:00Z in this line, I'm interested in the 10 characters in YYYY-MM-DD format. I need to copy those characters and paste them elsewhere in the document. There are *other* occurrences of dates in YYYY-MM-DD format and I want to replace each of those with the year-Month-Day copied from the first (originalAirDate) Find operation. I want to script this. I can find the first YYYY-MM-DD and copy it using: Find: "(originalAirDate : )(?P<orig>\d\d\d\d-\d\d-\d\d)" but how do I hold onto \P<orig> so I can do the subsequent Find operations and use it (\P<orig>) as the replacement text? (There will typically be three more occurrences of the YYYY-MM-DD format. Of course, I could probably do a whole folder of such files in a few seconds using Perl or some-such, if I knew Perl... Would someone care to help me with this? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. 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 specific feature request or would like to report a suspected (or confirmed) problem with the software, please email to "supp...@barebones.com" rather than posting to the group. -~----------~----~----~----~------~----~------~--~---