Re: Scanning for more than one specific character with Strin


#1

You can use

a.scan(/(s|k)/).

What’s in between the ‘/ /’ is called a “regular expression”.
These regular expressions are used to find patterns in strings that you
can describe in an approximate way.
They’re a powerful tool.
To see what’s available, look at

http://www.regular-expressions.info/
(http://www.regular-expressions.info/)
.

Best regards,

Axel