The URL's I am thinking of come from OpenLibrary. Currently on my site I 
have a list of books - represented by URLs in a YAML file - with Amazon 
links for each one. With the exception of a few (because Audible), these 
can be migrated to use OL instead.

The Amazon URL's are of the 
format: 
https://www.amazon.com/Kitchen-Confidential-Adventures-Culinary-Underbelly/dp/158234082X/
 
- so the root URL, a name, slash "dp", and an identifier.

OpenLibrary's URL's are similar: E.g, 
https://openlibrary.org/works/OL18147912W/Fear_Trump_in_the_White_House - A 
root URL, slash "works", an identifier, and a name.

Does it matter that this is a wholesale replacement of some lines?

On Sunday, February 7, 2021 at 11:26:01 AM UTC-5 [email protected] wrote:

> On 02/07/2021, at 09:54, Christopher Finazzo <[email protected]> wrote:
>
> I have a similar situation and am wondering if this would work...
>
> The Find pattern you described will indeed find all of the URLs in my 
> document, but if I want to replace each of them with the same root URL, 
> (So, instead of href="\0", I could use href="example.com") is this 
> something I could modify the script to do?
>
> ------------------------------
>
> Hey Christopher,
>
> That *should* be simple enough.
>
> Please provide a couple of *real-world* before and after examples of what 
> you want to find/replace.
>
> Seeing actual examples makes it *much* easier to construct a 
> proper regular expression.
>
> --
> Best Regards,
> Chris
>
>

-- 
This is the BBEdit Talk public discussion group. If you have a feature request 
or need technical support, please email "[email protected]" rather than 
posting here. Follow @bbedit on Twitter: <https://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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/bbedit/bb29c7e6-8cd4-4619-b1f6-4108dc04c913n%40googlegroups.com.

Reply via email to