zsh-users
 help / color / mirror / code / Atom feed
* [[ 'abcde' =~ (#i)Bcd ]]
@ 2022-11-07 21:10 Ray Andrews
  2022-11-07 21:26 ` Roman Perepelitsa
  2022-11-08 17:40 ` Phil Pennock
  0 siblings, 2 replies; 13+ messages in thread
From: Ray Andrews @ 2022-11-07 21:10 UTC (permalink / raw)
  To: Zsh Users


[[ 'abcde' =~ 'bcd' ]] && echo match1
[[ 'abcde' = (#i)ABcde ]] && echo match2
[[ 'abcde' =~ (#i)Bcd ]] && echo match3
[[ 'bcd' =~ 'abcde' ]] && echo match4

... I get match 1 and match 2.  I  understand not getting match 4 
because '=~' is not bi-directional, the latter value must be a subset of 
the former.  But why don't I get match 3? It seems to break no rules to 
make 'Bcd' case insensitive and then find it within 'abcde'.  Is there a 
workaround?



^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-11-08 18:44 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-07 21:10 [[ 'abcde' =~ (#i)Bcd ]] Ray Andrews
2022-11-07 21:26 ` Roman Perepelitsa
2022-11-07 21:47   ` Ray Andrews
2022-11-07 22:15     ` Lawrence Velázquez
2022-11-08  1:57       ` Ray Andrews
2022-11-07 21:50   ` Lawrence Velázquez
2022-11-08  2:05     ` Ray Andrews
2022-11-08  8:19       ` Roman Perepelitsa
2022-11-08 13:32         ` Ray Andrews
2022-11-08 14:37           ` Roman Perepelitsa
2022-11-08 14:30             ` Ray Andrews
2022-11-08 17:40 ` Phil Pennock
2022-11-08 18:43   ` Ray Andrews

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).