Re: How anchor to line end in regex

2020-08-22 Thread Lawrence Velázquez
Hi, > On Aug 22, 2020, at 10:13 PM, Budi wrote: > > How anchor to line end in bash regex [[ ]] > h=hi > [[ $h =~ ^hi\$ ]] && echo Yes > > cannot work, or is it bug yet Special characters are matched literally if they are quoted, so you just have to make sure the $ is not quoted. $ h=h

How anchor to line end in regex

2020-08-22 Thread Budi
How anchor to line end in bash regex [[ ]] h=hi [[ $h =~ ^hi\$ ]] && echo Yes cannot work, or is it bug yet