my @letters = <a b 3>; if $x.contains(any @letters) { ...
> On 10 Dec 2023, at 21:36, ToddAndMargo via perl6-users <perl6-users@perl.org> > wrote: > > Hi All, > > my Str $x="abc3defg"; if $x.contains( "a" || "b" || "3" ) { print "True\n"; > } else { print "False\n" }; > True > > Is there a way to tell .contains that you want to know > if any of a sequence characters is in a string other that > repeating || over and over. Any [a..z] or [0..9] option? > > Many thanks, > -T