On Tue, Jul 10, 2018 at 10:50:05AM -0400, Chet Ramey wrote:
>> […] However, this indicates to me that bash recognizes \< \> as word
>> anchors:
> No, it doesn't. It indicates that the system's POSIX regular expression
> implementation has extensions.
>> 3. bash evaluates them correctly when
On 7/10/18 9:02 AM, Paulo Marcel Coelho Aragão wrote:
> On Tue, Jul 10, 2018 at 08:27:18AM -0400, Greg Wooledge wrote:
>> Bash uses ERE (Extended Regular Expressions) here. There is no \< or \>
>> in an ERE.
>>
>> http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04
>
On 7/10/18 8:52 AM, Ilkka Virta wrote:
> On 10.7. 15:27, Greg Wooledge wrote:
>> On Mon, Jul 09, 2018 at 10:46:13PM -0300, marcelpa...@gmail.com wrote:
>>> Word boundary anchors \< and \> are not parsed correctly on the right
>>> side of a =~ regex match expression.
>>
>> Bash uses ERE (Extended
On 7/9/18 9:46 PM, marcelpa...@gmail.com wrote:
> Bash Version: 4.4
> Patch Level: 19
> Release Status: release
>
> Description:
> Word boundary anchors \< and \> are not parsed correctly on the right side of
> a =~ regex match expression.
Bash assumes Posix regular expressions (EREs), and
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, \
On Tue, Jul 10, 2018 at 10:02:34AM -0300, Paulo Marcel Coelho Aragão wrote:
> It baffles me that literal \< \> are not evaluated correctly
>
> paulo:~$ [[ 'foo bar' =~ \ ]] && echo yes || echo no
> no
In this context, the backslashes serve only to "quote" the less-than
and greater-than
On Tue, Jul 10, 2018 at 08:27:18AM -0400, Greg Wooledge wrote:
> Bash uses ERE (Extended Regular Expressions) here. There is no \< or \>
> in an ERE.
>
> http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap09.html#tag_09_04
Thanks for the reference. The document lists only ^ and $
On 10.7. 15:27, Greg Wooledge wrote:
On Mon, Jul 09, 2018 at 10:46:13PM -0300, marcelpa...@gmail.com wrote:
Word boundary anchors \< and \> are not parsed correctly on the right side of a
=~ regex match expression.
Bash uses ERE (Extended Regular Expressions) here. There is no \< or \>
in
On Mon, Jul 09, 2018 at 10:46:13PM -0300, marcelpa...@gmail.com wrote:
> Word boundary anchors \< and \> are not parsed correctly on the right side of
> a =~ regex match expression.
Bash uses ERE (Extended Regular Expressions) here. There is no \< or \>
in an ERE.
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale'
10 matches
Mail list logo