Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #16793 > unrolled thread
| Started by | Lawrence Velázquez <vq@larryv.me> |
|---|---|
| First post | 2020-08-22 22:40 -0400 |
| Last post | 2020-08-22 22:40 -0400 |
| Articles | 1 — 1 participant |
Back to article view | Back to gnu.bash.bug
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: How anchor to line end in regex Lawrence Velázquez <vq@larryv.me> - 2020-08-22 22:40 -0400
| From | Lawrence Velázquez <vq@larryv.me> |
|---|---|
| Date | 2020-08-22 22:40 -0400 |
| Subject | Re: How anchor to line end in regex |
| Message-ID | <mailman.829.1598150455.2469.bug-bash@gnu.org> |
Hi, > On Aug 22, 2020, at 10:13 PM, Budi <budikusasi@gmail.com> 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=hi $ [[ $h =~ ^hi\$ ]] && echo Yes $ [[ $h =~ ^hi$ ]] && echo Yes Yes vq
Back to top | Article view | gnu.bash.bug
csiph-web