bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Word boundary anchors \< and \> not parsed correctly on the right si


From: Paulo Marcel Coelho Aragão
Subject: Re: Word boundary anchors \< and \> not parsed correctly on the right side of =~
Date: Tue, 10 Jul 2018 10:15:51 -0300
User-agent: NeoMutt/20171215

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 !



reply via email to

[Prev in Thread] Current Thread [Next in Thread]