On Tue, Jul 10, 2018 at 09:09:06AM -0400, Greg Wooledge wrote: > In this context, the backslashes serve only to "quote" the less-than > and greater-than signs. It's just like writing > > [[ 'foo bar' =~ "<"foo">" ]]
You're absolutely right ! I wasn't looking at it from this angle, but yes, \ is just another form of quoting. > In order to put a backslash-that-acts-like-a-backslash-to-the-regex-engine > inside the RE on the right-hand side of =~ you need to put the RE into a > variable. Lesson learned, thanks !