Hello Tom,

Thank you very much for that explanation. Yes, it is very helpful and will help 
me to write more complex patterns.

Earlier this morning I was looking through the greg section of the BBEdit 
manual, trying to find what I was referring to as a “not operator”. I even 
checked online, but was unsuccessful.

My reasoning was that I had to write a pattern which looked for “my-doc.html”, 
but not for “https://www.billkochman.com/Articles/my-doc.html 
<https://www.billkochman.com/Articles/my-doc.html>”.

But now I understand that when the caret is used inside of square brackets, it 
actually does mean “not”, and does not signify the beginning of a line.

So again, your explanation has helped to expand my understanding regarding how 
grep patterns work. I will be archiving this message in Apple Mail for future 
reference.

Regarding relative links versus absolute links, oh gosh, I don’t even want to 
get into it.

Because of my recent conversion to AMP and SSL/TSL, I was going nuts with that 
one, trying to determine which was best.

So I conducted some web surfing, and all that did was make me even more 
confused, because amongst so-called SEO “experts”, there are clearly two 
divided camps, who each offer what they consider valid reasons for their 
particular approach.

I finally settled upon absolute URLs site-wide, the reason being that while 
even Google states that their bots are smart enough to follow relative links, 
using absolute links removes all doubts whatsoever.

Canonical links already have to be absolute, so I figured I should just make 
everything else to match.

Also, I learned through recent personal experience that when you start making 
major site-wide URL changes using BBEdit’s multi-file find and replace, you can 
very easily trip yourself up when ../ and ../../ or deeper are used in certain 
places. You may fix some things, but unknowingly break links in other places. 
Shiela Dixon’s Integrity Plus is a real help in that area.

I am actually in the process of eliminating all of my other domains. I am just 
going to let them expire, so that I can concentrate on just the one. So 
changing hosts is really not an issue with me.

But I am a little confused by your comment regarding sub-directories. If you 
move a folder higher or lower in your virtual host’s folder hierarchy, you do 
have to edit the HTML. You would have to add or remove certain ../, ../../, 
etc., or else the links will be broken.

Also, I tried adding the base URL meta tag to some of my documents, and if I 
recall correctly, the AMP validator reported that it was disallowed, so I 
removed them.

Oddly enough, I read an online comment not too long ago where someone said that 
they were going to add base URL as a valid meta tag. I guess they later decided 
against it. Who knows.

Anyway, to each his own regarding absolute versus relative. Whatever works.

Kind regards,

Bill K.


> On Feb 27, 2017, at 6:09 AM, Tom Robinson <barefootg...@gmail.com> wrote:
> 
> Normally relative links are a better way to run a site — you can move pages 
> to a different host, put them in sub-directories, etc., without changing the 
> HTML.
> 
> <a href="([^/]*)$
> 
> () The brackets are used to ‘capture' the find, so you can use the result in 
> the replace
> 
> [] Square brackets mean ‘character class’, which searches for the given 
> characters
> 
> ^ because the character class starts with a caret, everything inside the 
> square brackets is negated
> 
> / so we’re looking for anything which isn’t a slash
> 
> * look for 0 or more occurrences of anything which isn’t a slash
> 
> $ keep going until the end of the line.
> 
> Hope this helps.

-- 
This is the BBEdit Talk public discussion group. 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.
To post to this group, send email to bbedit@googlegroups.com.
Visit this group at https://groups.google.com/group/bbedit.

Reply via email to