Try this: Search (?s)^(Last Updated: [A-Z][a-z][a-z]\. \d\d?, \d\d\d\d)\n\n(.+)\n\n\n\n
Replace \1\n\nSynopsis:\n\n<==========================================================>\n\n\2\n\n<==========================================================>\n\n\n\n — Rod ----On Jul 22, 2025 at 6:26:16 AM, Bill Kochman wrote: Greetings friends, I am trying to do a global find and replace on a folder of 1,154 BBEdit documents. The operation needs to be very precise, as otherwise, it will REALLY mess me up, and will result in hours — if not days — of unnecessary work on my part. At the moment, all of my BBB articles have a header at the top, part of which looks like this: Last Updated: Jan. 10, 2011 The Year 2000 Hype, Aliens, Spirit Helpers, Channelers And Esoteric Knowledge, Propagation Of New Age Thought, Sheldon Nidle, UFO Mass Landings, Photon Belt, The Ascension Point, False Prophets & Charlatans Exposed By Time, The 2012 Hype, Stanley A. Fulham And The Transcendors, Weeds And Parable Of Wheat & Tares, Measuring Rod Of God's Word, Strong Delusion, Beware Of Time-Based Predictions, Verify The Reliability Of Source Information, Failed Predictions Weaken Faith In God's Word, Modern Scoffers And Christ's Return, Satan's Scheme To Discredit True Prophets Of God, True Faith Does Not Require Evidence Signs Or Miracles, Modern Apostasy, Mary Apparition In Wisconsin, Decline Of Roman Catholicism And Mary Worship, Evil Generation Seeks A Sign, Jewish Elders Demanded A Sign, Jewish Religious Elders Concealed Evidence Of Resurrection The body of text you see above is obviously different in each article, and followed by three blank lines. Then the main body of the article begins. To give you a quick background, I have been working on creating my own GPT at chatgpt.com for the past two weeks. However, my GPT has MAJOR problems with parsing text, accurate data retrieval, misattributions, hallucinations, inventions, etc. So one thing I though to do was to clarify that the above text after the date is actually the synopsis before the main body of each article. So what I am trying to do is to add the word “Synopsis", following by a divider on a new line, then the above text, followed by another divider on a new line, followed by three blank lines. In other words, the end product should look like this: Last Updated: Jan. 10, 2011 Synopsis: <==========================================================> The Year 2000 Hype, Aliens, Spirit Helpers, Channelers And Esoteric Knowledge, Propagation Of New Age Thought, Sheldon Nidle, UFO Mass Landings, Photon Belt, The Ascension Point, False Prophets & Charlatans Exposed By Time, The 2012 Hype, Stanley A. Fulham And The Transcendors, Weeds And Parable Of Wheat & Tares, Measuring Rod Of God's Word, Strong Delusion, Beware Of Time-Based Predictions, Verify The Reliability Of Source Information, Failed Predictions Weaken Faith In God's Word, Modern Scoffers And Christ's Return, Satan's Scheme To Discredit True Prophets Of God, True Faith Does Not Require Evidence Signs Or Miracles, Modern Apostasy, Mary Apparition In Wisconsin, Decline Of Roman Catholicism And Mary Worship, Evil Generation Seeks A Sign, Jewish Elders Demanded A Sign, Jewish Religious Elders Concealed Evidence Of Resurrection <==========================================================> The dates are different for every article, as is the text of the synopsis. As such I have tried to use something like the following in the find field: Last Updated: (.+?)\. (.+?), ([0-9][0-9][0-9][0-9])\n\n(.+?)\n\n\n\n The problem is that I cannot figure out what to use to cover the main text part of the synopsis which is AFTER ([0-9][0-9][0-9][0-9])\n\n and BEFORE \n\n\n\n. You can see that I have added a final (.+?) for the main text of the syopsis. However, when I use that, the text is not being highlighted, so that is apparently wrong. In the replace field, I am currently using the following, where \4 represents the main text part of the synopsis: Last Updated: \1\. \2, \3\n\nSynopsis:\n\n<==========================================================>\n\n\4<==========================================================>\n\n\n\n Not only can I not find the right syntax to represent the text part of the synopsis, but If I run it just like that, with the actual text included in the replace field -- instead of the final (.+?) -- BBEdit throws up this error: -- This is the BBEdit Talk public discussion group. If you have a feature request or believe that the application isn't working correctly, please email "[email protected]" rather than posting here. Follow @bbedit on Mastodon: <https://mastodon.social/@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 [email protected]. To view this discussion visit https://groups.google.com/d/msgid/bbedit/AB9E16F3-E3B4-4D9F-A6F1-51BB443B3ED7%40gmail.com. <Find-Replace-Error.jpg> If I hit the “Replace” button anyway, the results are this, and the text body of the synopsis is wiped out completely: Last Updated: Jan. 10, 2011 Synopsis: <==========================================================> <==========================================================> Those are three blank likes above this line. So what am I doing wrong? How do I get it to recognize the changing text in the synopsis section, so that it replaces everything, but includes the right synopsis text for each article when I do a global find and replace? Thanks to anyone who can help me figure out the last piece of the puzzle. Kind regards, Bill Kochman -- This is the BBEdit Talk public discussion group. If you have a feature request or believe that the application isn't working correctly, please email "[email protected]" rather than posting here. Follow @bbedit on Mastodon: <https://mastodon.social/@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 [email protected]. To view this discussion visit https://groups.google.com/d/msgid/bbedit/AB9E16F3-E3B4-4D9F-A6F1-51BB443B3ED7%40gmail.com. -- This is the BBEdit Talk public discussion group. If you have a feature request or believe that the application isn't working correctly, please email "[email protected]" rather than posting here. Follow @bbedit on Mastodon: <https://mastodon.social/@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 [email protected]. To view this discussion visit https://groups.google.com/d/msgid/bbedit/1619kQSNg0RNaf4Mdr%40gmail.com.
